\documentclass[12pt]{report} % \texorpdfstring{\TeX}{TeX} \usepackage{calculator} \begin{document} \begin{titlepage} \begin{center} {\huge The\\[20pt] TI-89 Calculator\\[20pt] in the\\[20pt] Basic\\[20pt] Probability and Statistics\\[20pt] Course}\\[20pt] {\large LTC Mark B. Wroth}\\[15pt] Department of Mathematical Sciences\\ United States Military Academy\\ West Point NY 10996\\[15pt] {\small Revision~\RCSRevision}\\[15pt] {\large \RCSDate} \end{center} \clearpage \vspace*{5in} \noindent This document may be freely reproduced as a complete document. Instructors using it as part of their course material are requested to notify the author at \texttt{mark.wroth@@us.army.mil} This is Revision~\RCSRevision, produced from \jobname.w on \RCSDate. The cartoon in Figure~\ref{fig:cartoon} is reproduced with the permission of the cartoonist, Cadet John K. Thompson, USMA 2004. \end{titlepage} \tableofcontents \listoffigures \listoftables \chapter{Introduction} \section{Why This Document?} This document was written as a supplement to assist students and teachers in MA206\index{MA206}, the second year probability and statistics course required of all cadets at the \ac{USMA}. This semester-long course is the final course in the core mathematics sequence. It is \begin{quotation} designed to advance [the student's] understanding of mathematical concepts and techniques used to model and analyze problems dealing with random effects and data\cite{IM206-1}. \end{quotation} Because of this focus, this course is not focused on the theory of probability and statistics; it is focused on the application of those sciences. Of course, it is not possible to fruitfully apply the tools of probability and statistics---or any other academic discipline---without a reasonable grounding in what is actually going on. But the focus of this course is on understanding of the tools applied to understanding of the real world. Advanced calculators such as the HP-48 and TI-89 present both an opportunity and and a challenge to students of probability and statistics. On one hand, the calculator makes actually \emph{performing} the sometimes tedious calculations needed in probability and statistics a matter of punching a few buttons. Advanced calculators also largely or completely eliminate the need for cumbersome tables. But this capability comes with a price. Not only does the student have to master the concepts of the course---a challenge in itself---but they must also learn what the capabilities of the calculator are and how to invoke them. This document is aimed at students and teachers who are trying to master the aspects of the advanced calculator (specifically the TI-89) that apply to the basic probability and statistics course. It supplements the course textbook and the calculator handbook and focuses on those uses of the calculator specifically needed for this course. It covers both the built in operations of the calculator, and programs written specifically to assist with the subject. We assume that the student has been using the same calculator through the core math sequence, and is therefor familiar with basic calculator operations. In addition to basic arithmatic computation, this includes symbolic manipulation, basic calculus (particularly numerical quadrature) and graphing of functions. One of the powerful features of the advanced calculators is programmability. In addition to briefly covering the built in functions of the calculator, this document discusses some programs written to assist with subjects covered in the basic probability and statistics course, and provides some additional detail on the use of functions and programs that are part of the TI-89 and \StatsLE\ \dfn{flash application}\footnote{A flash application is an additional software package loaded into the TI-89 to provide specialized additional capabilities. MA206 uses the \StatsLE\ flash application, available from the Texas Instruments' web site.}. The use of the calculator functions, and the implementation of the locally produced functions and programs, is discussed in Appendix~\ref{chap:prog}. \section{How to Use This Document} \label{sec:howtouse} This document is generally divided into three main parts. Chapter~\ref{chap:generalissues} deals with topics that affect how the course is structured and overall strategies for using the calculator in a probability and statistics course. Chapters~\ref{chap:descriptive} through~\ref{chap:hypothesis} discuss the major lesson blocks in MA206. Finally, the appendices provide additional details on specific topics. Appendix~\ref{chap:refpages} ``Program and Function Reference'' may be of special interest, as it gives use notes for the calculator programs defined in this document. It also gives the complete text of the programs (in ASCII form) and provides some discussion of selected programs from the \StatsLE\ application. \chapter{General Issues in Learning Probability and Statistics Armed with an Advanced Calculator} \label{chap:generalissues} \section{Use of Graphing Calculators in Teaching and Learning Mathematics} It appears reasonable to believe---and there is some research evidence to suggest\footnote{See, for example, the research summary at \cite{Burrill}}---that how instructors model and require the use of the calculator strongly affects how students make use of the calculator. This is especially significant if the capabilities of the calculator to move between different representations of the data, or to make use of the \acr{CAS} capabilities of the system, are to be used effectively. This line of research also suggests that the way the instructor presents the process of thinking about mathematics in general, and probability and statistics in particular, affects how students use the calculator's capabilities (and how they view mathematics in general). The implication of these thoughts is that instructors must become familiar with the tools and techniques they intend their students to take away from the course, and model them in the classroom. Since this requires some advanced preparation, both to decide how the calculator should be used and for the instructor to master the techniques involved. One of the functions of this document is to present both a point of view on this subject and to provide information allowing other instructors to reach their own conclusions. The following sections are presented in an order generally conducive to a one semester course in probability and statistics, following the outline of MA206, the core course in the subject taught at \ac{USMA} using \cite{Devore5} as the text. With some modification, it should be helpful in most basic probability and statistics courses. \begin{figure}[htbp] \begin{center} \includegraphics[width=3.5in]{./figs/JohnnyCadet7.png} \caption{A cautionary note (with thanks to Cadet John Thompson, USMA '04)} \label{fig:cartoon} \end{center} \end{figure} The focus of many probability and statistics courses, and many students, appears to be on mastering the basic computations of the subject. For example, a major goal during a block on the exponential random variable is being able to correctly compute probabilities involving such a random variable. Facility with this calculation is then assumed later in the course. With a properly set up calculator, the calculation itself is simple; the challenge is in knowing when to use the distribution, what value to use for the parameter, and how to interpret the result. The calculator can also largely replace the use of tables, and hence of the need to standardize random variables for most purposes. The exception to this is that many statistical packages, including the TI-89, use and display standardized random variables in statistical tests, so some understanding of the process is needed. \section{Interval Probabilities} Computing the probability that a random variable lies in a stated interval is a common task in the probability and statistics course. Especially with the capabilities of the TI-89, there are several valid strategies students may use for computing such probabilities: \begin{itemize} \item Manipulate the \ac{PDF} (or \ac{PMF}) directly. For example. integrate the \ac{PDF} over the interval. This approach implies the need for a user-manipulatable \ac{PDF} (\ac{PMF}) functions. \item Subtract the endpoint \ac{CDF} values. Most easily executed at the \key{Home} entry line, this approach implies the need for a user-manipulatable \ac{CDF} for each distribution. \item Create (or find) a calculator program which computes the interval probability. Internally, such a program may use either computation approach. \end{itemize} There is no theoretical reason to choose between these techniques. Ideally, a student would master all of the different techniques and choose the technique appropriate to the particular problem. Common practice in teaching the computation is to cover \ac{PDF}-based approaches, but to emphasize \ac{CDF}-based approaches. This fits well with the use of distribution tables, and may be easiest for some students because of this connection. At the same time, the primary user interface for the probability computations in the TI-89 \StatsLE\ is a program based \ac{GUI} which allows the user to enter the distribution parameters and the ends of the interval. While entry line functions are also provided in the \StatsLE, use of these functions from the entry line is essentially undocumented. Consistency with the general approach of the TI-89 would appear to suggest \ac{GUI}-based interfaces are desirable. This requires writing programs for the distributions which are not included in the Statistics with List Editor application. For MA206, this would include the Hypergeometric, Uniform, and Exponential distributions. The TI-89 allows the student to approach the calculation of interval probabilities any of the above ways---given the availability of either existing programs or basic programming skills for the third approach. To help gain understanding, it may be a good idea for students to focus on one method and ensure \emph{it} is mastered. If \ac{GUI}-based programs are available for all of the distributions of interest, focusing on this technique is likely to be the easiest. \section{Standardized Random Variables} The use of the calculator largely eliminates the need to use traditional probability tables. Since being able to use the standard normal probability tables is one of the main ways the use of a standardized random variable is presented, eliminating the need to use the tables at all also eliminates one of the major uses of standardized variables. It is tempting to simply ignore the topic completely if the student has adequate calculator skills. However, there are several reasons to understand the basic manipulations surrounding standardized random variables, and the standard normal distribution in particular. Perhaps least important is the fact that traditional tables, while in some sense obsolescent as calculators with basic probability functions become more common, are still available when calculators are not, so some ability to use them is probably a good idea. More important from the perspective of the course material is that the manipulations to standardize the Normal random variable are the basis of the manipulations by which we derive the formulas for confidence intervals. So understanding how to standardize the normal random variable is a lead in to the material on confidence intervals. Finally, statistical packages---including the TI-89's advanced statistics functions--- frequently state hypothesis test results in terms of standardized test statistics. Understanding the test results depends to some extent on understanding the normalized versions of the statistics. Having said that, however, this document largely focuses on the direct manipulation of the random variables directly of interest in the problem. Standardized random variables are a special case of this focus. \chapter{Calculator Tips} \label{cha:calctips} \section{Split Screen} \label{sec:splitscreen} The calculator can split the main screen into two halves, displaying two independent applications. This is especially useful for working at the \key{Home} screen while keeping the \StatsLE\ application accessible. To split the screen, go to the \key{Modes} menu, and set \key{Split 1 App} and \key{Split 2 App} to the two applications you want to use. Obvious candidates are \key{Home} and \key{Stats/List Editor}. Then set \key{Split Screen} to the mode you want; \key{Left Right} is probably the preferable option if the list editor is one of the applications. This functionality is described in \cite[Chapter14]{AMS}. \chapter{Descriptive Statistics} \label{chap:descriptive} \section{Numerical Methods} The TI-89's \key{one variable statistics} application computes the sample mean, variance and standard deviation (using both the sample and population formulas), the median, and the quartiles of the sample. \subsection{Computing One-Variable Sample Statistics} \label{sec:onevar} \begin{enumerate} \item Enter the sample data into a list. \item Select the 1: 1-Var Stats option from the \key{[F4] Calc} menu (of the Statistics with List Editor application). \item Enter the name of the list containing the sample data, either by entering the variable name directly, or by selecting \key{[2nd] VAR-LINK} and selecting the variable. \item Select \key{ENTER} to confirm the selection, and again to compute the statistics. \end{enumerate} \begin{tip} The one variable statistics output includes both \key{Sx} and \key{$\sigma$x}. Despite the similarity of the latter label in form to the symbol $\sigma_x$,the \emph{population} standard deviation of the random variable $X$, it is not that quantity. Rather, it is \begin{equation} \label{eq:fred} \sqrt{\frac{\sum_{i=1}^n \left( x_i-\bar{x} \right)^2}{n}} \end{equation} While this statistic is sometimes useful, students tend to confuse it with the sample standard deviation \begin{equation} \label{eq:ssdev} s_x = \sqrt{\frac{\sum_{i=1}^n \left(x_i-\bar{x}\right)^2}{n-1}} \end{equation} which is almost always the quantity needed from a sample calculation. Put another way---if you need to \emph{calculate} the standard deviation from sample data, you almost certainly want \key{Sx}, not \key{$\sigma$x}. \end{tip} \section{Graphical Methods} \subsection{Histograms} A basic histogram is one of the standard plot types available. To create a histogram of data:\index{histogram}\index{plots!histogram} \begin{enumerate} \item Enter the data into a list variable. \item Select \key{[F2] Plots} to bring up the Plots menu. \item Select \key{1:Plot Setup....} \item Highlight a plot line. \item Select \key{[F1] Define}. \item Select \key{Plot Type}; on the popup menu, select \key{4:Histogram} \item Enter the name of the list variable containing the data in the \key{x} box. \item Enter an appropriate width for the histogram intervals in \key{Hist. Bucket Width}. \item Ensure the \key{NO} option is selected in the \key{Use Freq and Categories?} popup. \item Select \key{ENTER}. \item Select \key{[F5] ZoomData}.\index{ZoomData} \end{enumerate} \subsection{Box Plots} A basic box plot is one of the standard plot types available. \index{box plot}\index{plots!box} \begin{enumerate} \item Enter the data into a list variable. \item Select \key{[F2] Plots} to bring up the Plots menu. \item Select \key{1:Plot Setup....} \item Highlight a plot line. \item Select \key{[F1] Define}. \item Select \key{Plot Type}; on the popup menu, select \key{3:Box Plot} \item Enter the name of the list variable containing the data in the \key{x} box. \item Ensure the \key{NO} option is selected in the \key{Use Freq and Categories?} popup. \item Select \key{ENTER}. \item Select \key{[F5] ZoomData}.\index{ZoomData} \end{enumerate} The \key{[F3] Trace} function allows easy examination of the particular values included in the plot. \chapter{{Basic Operations}} \section{Counting} The TI-89 computes several basic functions useful for counting problems. For most of these operations, there are two or three different ways to access the same calculator function: \begin{itemize} \item Select the function from a menu (usually the Math menu, accessed with the \key{[2nd MATH]} key). \item Type the name of the function in the Entry Line, using the alphabetic keys (or a menu pick from a custom menu). \item Add the function to the Entry Line using the \key{CATALOG}. Functions defined from flash applications (such as Statistics with List Editor) and user-defined functions are also available through the \key{CATALOG} function. \item Add the function to the entry line using the \key{Var Link} menu. \end{itemize} \section{Counting Techniques} \subsection{Factorials} The factorial function is accessed with the postfix operator \key{!} which can be entered from the keyboard (using the \key{[2nd] CHAR} function) or from the \key{[2nd] MATH} \key{7: Probability} menu.\index{factorial} It is also found on the \key{Counting} menu of the MA206 custom menu. \subsection{Permutations} The ``permutations'' function can be accessed with the function \key{nPr(} function. This can be accessed via the \key{[2nd] MATH} \key{7: Probability nPr(} menu pick. It is also found on the \key{Counting} menu of the MA206 custom menu. \index{permutations} \subsection{Combinations} The ``combinations'' function can be accessed through the \key{nCr(} function. This can be accessed via the \key{[2nd] MATH} \key{7: Probability} \key{nCr(} menu pick, or by typing the function name in the entry line. It is also found on the \key{Counting} menu of the MA206 custom menu. \index{combinations} \chapter{Random Variables and Probability Distributions} \section{Discrete Random Variables} \subsection{Arbitrary Random Variables} \label{sec:arbitrary-discrete} List operations used to examine and manipulate arbitrary discrete probability mass functions. If the \ac{PMF} can be described algebraically, or by a function defined in the TI-89, the summation operator can be used to compute quantities defined based on a summation over the entire \ac{PMF}. \index{probability distributions!arbitrary (discrete)} An example of such a quantity is the expected value. To compute the expected value of the function defined by \key{TIStat.binomPdf} (which happens to be the binomial distribution) using the definition \[ E(X) = \sum_{i=0}^n x\,p(x) \] we could enter into the calculator \begin{center} \tt $\sum$(x*TIStat.binomPdf(5,.2,x),x,0,5) \end{center} For this distribution, this is easily computed to be $np=1$, confirming the result given by the calculator. Unfortunately, the calculator does not handle the general expression (that is, it will not compute the formula for the expected value in general).\index{expected value!discrete distribution} For a more general arbitrary distribution, enter the values of the random variable into one list, and the associated probabilities into the corresponding positions of a second list. Entering the values from \cite[page~110]{Devore5} into the lists named \key{x} and \key{p}, we can compute \begin{center} \tt $\sum$(x[i]*p[i],i,0,7) \end{center} \noindent finding 4.57, the same result obtained by Devore. This notation parallels the traditional notation \[ \sum_{i=0}^7 x_i\,p(i) \] \subsection{Binomial Distribution} The Binomial probability distribution is one of the pre-defined probability distribution in the \StatsLE\ application. It is accessed via the \key{[F5] Distr} menu, using either the \key{B: Binomial Pdf} or \key{C: Binomial Cdf} menu items. \index{binomial distribution} \index{probability distributions!binomial} It can also be accessed through the \key{binomGUI()} program described later in this document. Section~\ref{sec:binomgui} describes the use and implementation of this function. \subsection{Hypergeometric Distribution} The Hypergeometric probability distribution is not one of the pre-defined distributions in the Statistics with List Editor. Since it is not pre-defined for us, we can define the \ac{PDF} and CDF as TI-89 functions; \key{hypergeo} (Section~\ref{sec:hypergeo}) is a program interface to those functions. \index{hypergeometric distribution} \index{probability distributions!hypergeometric} The \ac{PDF} of the hypergeometric distribution is shown in \begin{equation} \label{eqn:hypergeopdf} p_H(x) = \frac{\nCr(Succ,x) \nCr(Pop-Succ,n-x)}{\nCr(Pop,n)} \end{equation} Where \begin{varlist} \key{Pop} is the number of elements in the population, \key{Succ} is the number of elements coded ``success'', \key{n} is the sample size, \end{varlist} and \begin{equation} \max(0, n - Pop + Succ) \leq x \leq \min(n, Succ) \end{equation} The side conditions deal with the fact that the minimum number of successes in the sample is limited by the total number of failures in the population and the sample size (you can't have more failures in the sample than there are in the population), and the maximum number of successes in the sample is limited by the number of successes in the population. \subsection{Poisson Distribution} The Poisson probability distribution is one of the pre-defined probability distribution in the Statistics with List Editor application. It is accessed via the \key{[F5] Distr} menu, using either the \key{D: Poisson Pdf} or \key{E: Poisson Cdf} menu items. \index{Poisson distribution} \index{probability distributions!Poisson} \section{Continuous Random Variables} \subsection{Arbitrary Distributions} The TI-89`s calculus applications can significantly ease the manipulation of arbitrary continuous probability distributions through their ability to find both definite and indefinite integrals. You reach these functions through the HOME screen, and should already be familiar from earlier calculus courses.\index{calculus functions} The major caution in applying the basic calculus functions to the \ac{PDF} is to ensure that the limits of integration are correctly applied. Like any computer, the TI-89 will do what you tell it to, which may not be what you intended, particularly for piecewise defined functions! \subsubsection{Probabilities} Finding the probability that an arbitrarily defined continuous random variable lies in a given interval is, by definition, a matter of integrating the \ac{PDF} over the interval. For simply defined functions (e.g. the Exponential distribution) this is easily accomplished with the Integrate function from the \key{HOME} \key{[F3] Calc} menu. \index{probability distributions!arbitrary (continuous)} \subsubsection{Expected Value} Finding the expected value of an arbitrarily defined continuous random variable can be accomplished by applying the definition of expected value. For simply defined functions (e.g. the Exponential distribution) this is easily accomplished with the Integrate function from the HOME \textbf{[F3] Calc} menu. \index{expected value!continuous distribution} For example to find the expected value of \[ f(x) = \left\{ \begin{array}{ll} 0.15\,e^{-0.15(x-0.5)} & x\ge0.5 \\ 0 & \textrm{otherwise} \end{array}\right. \] \cite[Example~4.4]{Devore5}, we compute \[ \int_{-\infty}^{0.5} 0 \,dx + \int_{0.5}^{\infty} 0.15\,e^{-0.15(x-0.5)}\,dx \] While this integral should be well within the capability of the student, it can also be solved as \begin{center}\tt \TIint(x*0.15*\textit{e}\caret(-0.15*(x-0.5)),x,0.5,\ensuremath{\infty}) \end{center} giving the result 7.16667. \begin{tip} The TI-89 exponential operator, \key{\textit{e}\caret(}, is not the letter \key{e}; it is entered using the \key{x} key. \end{tip} \subsubsection{Variance} Finding the variance of an arbitrarily defined continuous random variable can be accomplished by applying the definition of variance. For simply defined functions (e.g. the Exponential distribution) this is easily accomplished with the Integrate function from the HOME \key{[F3] Calc} menu. The computational formula, \[ V(X)=E(X^{2})-[E(X)]^{2}\] can be applied by integrating to find the expected value of $X^{2}$; this may not be easier than applying the definition directly. Defining the \ac{PDF} or the CDF as a TI-89 function allows it to be used in subsequent calculations. Examples of reasonable definitions are given for some of the probability distributions used in the basic probability and statistics course discussed below. \subsection{Uniform Distribution} The Uniform distribution is not a separately defined probability distribution in the Statistics with List Editor application. Therefore all manipulations of random variables with this distribution depend on manipulating the \ac{PDF} directly, user defined programs, or on the use of known formulas. \index{uniform distribution} \index{probability distributions!uniform} The cumulative distribution function can be defined as a TI-89 function for convenience in calculation. An example of such a definition is shown in in the \key{unifcdf} reference page (Section~\ref{sec:unifcdf}). \subsection{Exponential Distribution} The Exponential distribution is not a separately defined probability distribution in the Statistics with List Editor application. Therefore all manipulations of random variables with this distribution depend on manipulating the \ac{PDF} directly, user-defined programs, or on the use of known formulas. The \key{expcdf()} function (discussed in the Section~\ref{sec:expcdf}, \key{expcdf} reference page) can be used on the TI-89 to compute probabilities related to exponential random variables. For $\lambda>0$, it implements the analytic probability distribution function: \begin{equation} \label{eq:expdistn} f_X(x) = \left\{ \begin{array}{ll} \lambda\,e^{-\lambda x} & x \ge 0 \\ 0 & \textrm{otherwise} \\ \end{array} \right. \end{equation} \index{exponential distribution} \index{probability distributions!exponential} \subsection{Normal (Gaussian) Distribution} The Normal, or Gaussian, probability distribution is one of the pre-defined distributions in the \StatsLE\ application. Because of its promenance in statistical applications, there are a variety of built-in functions for accessing and manipulating this distribution. \index{Normal distribution} \index{Gaussian distribution} \index{probability distributions!Normal} \subsubsection{Computing Normal Probabilities} There are two main methods for computing probabilities involving the Normal distribution; the Normal Cdf function (accessed from the \key{[F5] Distr} menu of the \StatsLE\ application), and with the Shade function (also accessed from the \key{[F5] Distr} menu of the \StatsLE\ application). Both require the mean, standard deviation, and limits of the interval; the \key{Shade} function, in addition to computing the probability that the random variable is in the interval, draws the \ac{PDF} and shades the area of interest.\index{plots!Normal} \subsubsection{Normal Probability Plots} The \key{[F2] Plots} menu includes the ability to create a normal probability plot of data in one of the lists. To draw a normal probability plot: \index{probability plot, normal} \index{plots!probability} \begin{enumerate} \item Start the \StatsLE\ application. \item Enter the data into a list variable. \item Select the Plots menu by pressing \key{[F2] Plots}. \item Select \key{2:Norm Prob Plot}. \item Fill out the resulting \key{Norm Prob Plot...} requestor: \begin{enumerate} \item Select an unused list variable at the \key{Plot Number} popup. \item Enter the name of the list variable containing the data for which the probability plot is needed in the \key{List:} box. \item Select values for the remaining entries on the requestor. The default values are probably acceptable. \end{enumerate} \item Select \key{ENTER} to close the requestor. \item Select the \key{Plots} menu by pressing \key{[F2] Plots}. \item Select \key{1:Plot Setup}. \item Select the plot variable containing the normal scores (the name of this variable was chosen in the \key{Plot Number} popup of the \key{Norm Prob Plot...}) by highlighting it using the cursor keys and pressing \key{[F4]}. \item Display the plot by pressing \key{[F5] ZoomData }. \end{enumerate} \chapter{Point Estimates} The TI-89 calculates a variety of sample statistics that can be used as point estimators for various quantities. The procedure for computing the most common of them is described above (in Section~\ref{sec:onevar}). This procedure produces a dialog box showing the following statistics: \begin{description} \item[\key{$\bar{x}$}] The sample mean.\index{mean, sample} \item[\key{$\sum x$}] The sample total.\index{total, sample} \item[\key{$\sum x^2$}] The sum of the squared observations. \item[\key{Sx}] The sample standard deviation, computed as \[ \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n-1} \] \index{standard deviation, sample} \item[\key{}] The ``population'' standard deviation, computed as \[ \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n} \] Note that this is the the true population standard deviation \emph{only} if the \emph{entire} population is part of the list on which the statistics are computed. \emph{This value is not the population standard deviation for any other sample!} A common mistake made by students is to use this value for an unknown population standard deviation. \item[\key{n}] The sample size.\index{size, sample}\index{sample size} \item[\key{Min\%}] The sample minimum.\index{minimum, sample} \item[\key{Q1\%}] The first sample quartile; the value below which one quarter of the sample observations fall. \item[\key{Med\%}] The sample median; the value below which half of the sample observations fall.\index{median, sample} \item[\key{Q3\%}] The third sample quartile; the value below which three quarters of the sample observations fall. \index{quartile, sample} \item[\key{Max\%}] The sample maximum.\index{maximum, sample} \item[\key{$\sum(x-\bar{x})^2$}] Sum of the squared deviations. \end{description}\index{one variable statistics} The interval estimation functions provided by the TI-89 will also provide the point estimates of the relevant parameter when they compute the value based on a list containing the sample data.\index{point estimates!provided by interval estimation functions} \chapter{Confidence Intervals} \label{cha:ci} \begin{quotation} \textit{The following development, more theoretical and expository than the rest of this document, is intended to provide an alternate introduction to confidence intervals more directly tied to the capabilities introduced by the advanced calculator than the equivalent material in \cite{Devore5}.} \end{quotation} \section{Purpose of Interval Estimates} \label{sec:cipurpose} The disadvantage of point estimates is that in isolation they provide no information about the accuracy of the estimate. Merely from a point estimate that, say, the average height of a randomly chosen student is 70~inches, the reader cannot tell if this value is precisely known, or only very approximately known. Experimental scientists have been dealing with this issue for many years, and a variety of conventions for dealing with it have been tried. For example, one approach is to quote only the number of significant figures that are accurately known: 70 is different than 70.0 is different than $7\times10^1$. While this can be a convenient shorthand, it is counterintuitive in that from a mathematical sense all three of those representations express \emph{exactly} the same number. It is also problematic in that there is no easy way to express the idea that ``I'm pretty sure the value is between 68 and 72'', an uncertainty that does not fall neatly into a power of ten. This general concern leads to expressing a measurement as a point estimate plus or minus some value that expresses the uncertainty assigned by the experimenter to the value. This is the approach commonly taken by \ac{NIST} in reporting its experimental results, and is probably familiar to the student from course work in the physical sciences. \ac{NIST}'s stated policy \cite{NIST-TN1297} is to express the \dfn{combined standard uncertainty} $u_c$, representing the estimated standard deviation of the measurement\footnote{The combined standard uncertainty includes estimates of both uncertainties estimated by statistical means (\dfn{Type~A evaluation of uncertainty}) and those estimated by other means (\dfn{Type~B evaluation of uncertainty}). Type~A evaluation is generally what we are dealing with in a statistics course; Type~B evaluation deals with the experimenter's evaluation of other sources of error, including experimental bias. An extended discussion of this is beyond the scope of this document; the curious ready may consult \cite{NIST-TN1297}.} This is commonly written as $\hat\Theta \pm u_c$ or, in our height example, $70\pm2$ inches. Another way to write this would be as the interval \[\left(\hat\Theta - u_c, \hat\Theta + u_c\right)\] where we are treating the value of the estimator as a random variable (because its value is not known in advance). How should we interpret this interval? The answer lies in \ac{NIST}'s definition of $u_c$ as the standard deviation of the measurement. An experimental measurement is a value computed from (usually) repeated observations of a quantity; in our terminology, a \emph{sample} of all possible observations of that quantity. In other words, an experimental measurement is a \emph{statistic}, and like any other random variable, it has a distribution and, therefore, a standard deviation\footnote{In the most general case, it is not true that all random variables have finite standard deviation. But at this level of discussion, this refinement has little consequence.} So the interval we are talking about is \[ \left(\hat\Theta - \sigma_{\hat\Theta}, \hat\Theta + \sigma_{\hat\Theta}\right) \] \begin{Note} A truly rigorous discussion would at this point have to discuss the consequences of the fact that, while the experimenter would \emph{like} to know $\sigma_{\hat\Theta}$, in reality he or she almost never does. Furthermore, the definition of $u_c$ includes the experimenter's non-statistical estimates of the uncertainty of the measurement. Inclusion of these non-statistical estimates makes it difficult to proceed rigorously from the standpoint of mathematical statistics. In the development that follows, we will address some of the consequences of having to estimate $\sigma_{\hat\Theta}$. Dealing with the consequences of including non-statistical estimates of uncertainty is well beyond the scope of this paper. \end{Note} If we know the probability distribution of $\hat\Theta$ and the value of the parameter $\theta$, we could compute \[ \P(\hat\Theta - \sigma_{\hat\Theta} < \theta < \hat\Theta + \sigma_{\hat\Theta}) \] the probability that the \dfn{random interval} contains the true value of the parameter. Notice that in this expression, unlike most of the probability statements we have encountered, the random variable is on the \emph{ends} of the interval, \emph{not in the center}. That is what the expression \dfn{random interval} means. Further development of confidence intervals depends on what we know (or can assume) about the distribution of the population and the statistics we are collecting. \section{Samples from a Normal Population} In reality, of course, we do not know enough to make this computation. In fact, if we did, we would not need to; since the whole point of the exercise is to estimate $\theta$, knowing its value would mean that we were done. But for some practical cases we can proceed anyway. Suppose we are sampling from a Normal population, and assume for the moment that we know $\sigma^2$ and are trying to estimate $\mu$. The obvious estimator for $\mu$ is $\bar{X}$, since that statistic is the \ac{MVUE} for $\mu$. If the underlying population is Normally distributed, $\bar{X}$ is also Normally distributed, with $\E(\bar{X})=\mu$ and $\V(\bar{X}) = \sigma^2/n$. Then \[ \P(\bar{X} - \sigma_{\bar{X}} < \mu < \bar{X}+\sigma_{\bar{X}}) \] is just the probability that a Normal random variable is within one standard deviation of its mean, or about 68\%. We formally express this by saying that the interval \CI(\bar{X} - \sigma_{\bar{X}}, \bar{X} + \sigma_{\bar{X}}) is a 68\% \dfn{confidence interval} for $\mu$. More generally, we would say that it is a $100(1-\alpha)$\% confidence interval, with $\alpha\approx32$\%. Conventionally, in order to allow us to choose probabilities other than 68\%, we add a \dfn{coverage factor} $k$ to the definition \[ \P(\hat\Theta - k\sigma_{\hat\Theta} < \theta < \hat\Theta + k\sigma_{\hat\Theta}) \] \[ \P(\bar{X} - k\sigma_{\bar{X}} < \mu < \bar{X}+ k\sigma_{\bar{X}}) \] By choosing the coverage factor $k$ appropriately, we can make $\alpha$ any probability we want to. While the choice of $k=1$ is suggested for the general reporting of experimental uncertainty by \ac{NIST} other choices are conventional as well. Usually these other choices are expressed not by defining values of $k$, but by defining the resulting levels of either $\alpha$ (the \dfn{significance level}) or $100(1-\alpha$\% (the \dfn{confidence level}). The expression can be manipulated to make understanding how to find $k$ easier. \[ \P(\hat\Theta - k\sigma_{\hat\Theta} < \theta < \hat\Theta + k\sigma_{\hat\Theta}) = 1-\alpha \] \[ \P(- k\sigma_{\hat\Theta} < \theta - \hat\Theta < + k\sigma_{\hat\Theta}) = 1-\alpha \] \[ \P(- k < \frac{\theta - \hat\Theta}{\sigma_{\hat\Theta}} < + k) = 1-\alpha \] \[ \P(k > -\frac{\theta - \hat\Theta}{\sigma_{\hat\Theta}} < - k) = 1-\alpha \] \[ \P(k > \frac{\hat\Theta - \theta}{\sigma_{\hat\Theta}} > - k) = 1-\alpha \] \[ \P(-k < \frac{\hat\Theta - \theta}{\sigma_{\hat\Theta}} < k) = 1-\alpha \] The numerical value of $k$ depends on the distribution of the statistics involved in the confidence interval and on the desired probability $\alpha$. The conventional notation in this case is $z_{\alpha/2}$; $z$ because of the assumption that the distribution involved is Normal (because we are sampling from a Normal distribution, $\hat\Theta = \bar{X}$ is Normally distributed), and $\alpha/2$ because to put a probability of $\alpha$ outside the confidence interval, we need to put $\alpha/2$ outside each end of the interval. More specifically, because we are dealing with distances away from the the mean of the distribution, and are scaling those distance by the standard deviation of the distribution, the $k$ value in this case is based on a \emph{standard} Normal distribution, $Z$---one whose mean is zero and standard deviation is 1. To compute the numerical value, we need to compute the value $z_{\alpha/2}$ such that \[ \P(Z > z_{\alpha/2}) = \alpha/2 \] With the TI-89, this value is easy to find. Picking $\alpha=0.1$, we can find $x_{0.05}$ using the inverse Normal function to be 1.64485. Since the variance of $\bar{X}$ (given that we know $\sigma$) is $\sigma^2/n$. This confidence interval \begin{equation} \label{eqn:zint} \bar{X} \pm z_{\alpha/2}\frac{\sigma}{\sqrt{n}} \end{equation} gives a $100(1-\alpha)$\% confidence interval for the mean of a Normal population whose standard deviation $\sigma$ is known. This is the confidence interval that the TI-89 \guimenu{ZInterval} function computes. But we are working on the assumption that we know $\sigma$, the true population standard deviation. Usually this will not be true; if we know enough about the distribution to know its standard deviation, we also already know its mean! Because the situation---where we are dealing with a population modeled by a Normal distribution with unknown mean $\mu$ and standard deviation $\sigma$---is fairly common, considerable thought has gone into how to find the appropriate values. The approach starts with the random variable \[ T = \frac{\bar{X} - \mu}{\hat{\sigma_{\bar{X}}}} = \frac{\bar{X} - \mu}{\frac{S}{\sqrt{n}}} \] This random variable has a \dfn{Student's $T$-distribution} with $n-1$ degrees of freedom. The $T$-distribution is very similar to the standard Normal, $Z$, except that it has one parameter, the number of degrees of freedom $\nu$. The effect of this parameter is to define how much more variable than the standard Normal the $T$ is; the \emph{smaller} $\nu$ is, the more variable the $T$ distribution is. If $\nu=\infty$, the $T$ distribution \emph{is} the standard Normal. For finite values of $\nu$, the variance of the $T$ is greater than 1. Reversing the process by which we explored the value of $k$, we can find that for this case the interval \[\CI(\bar{X}-k\frac{S}{\sqrt{n}}, \bar{X}-k\frac{S}{\sqrt{n}})\] gives an interval whose confidence level $100(1-\alpha)$\% is determined by the coverage factor $k$ in the same way as above. Using similar notation, we define $t_{\alpha/2,\nu=n-1}$ as the value that puts probability $\alpha/s$ outside each end of the interval, giving the interval \begin{equation} \label{eqn:tint} \CI(\bar{X}-t_{t_{\alpha/2,n-1}}\frac{S}{\sqrt{n}}, \bar{X}-t_{\alpha/2,n-1}\frac{S}{\sqrt{n}}) \end{equation} as a $100(1-\alpha/2)$ confidence interval. This is the confidence interval that the TI-89 calculates from the \guimenu{TInterval} menu function. Similarly, starting from the fact that if the population is Normal with mean $\mu$ and standard deviation $\sigma$ the random variable \[ \frac{(n-1)S^2}{\sigma^2} \] has a $\chi^2$ distribution with $n-1$ degrees of freedom, we can find that the confidence interval \begin{equation} \label{eqn:chi2int} \CI(\frac{(n-1)S^2}{\chi^2_{\alpha/2; n-1}}, \frac{(n-1)S^2}{\chi^2_{1-\alpha/2; n-1}}) \end{equation} is a $100(1-\alpha)$\% confidence interval for the variance of a Normal population. This is the confidence interval computed by the \key{Chi2int} and \key{Chi2GUI} TI-89 functions. \section{Large Samples from Non-Normal Populations} If the underlying population is not Normal, but has mean $\mu$ and finite variance $\sigma^2$, the distribution of $\bar{X}$ is \emph{not} exactly known. However, if the size of the sample is large, the Central Limit Theorem argues that $\bar{X}$ is \emph{approximately} Normal, with mean $\mu$ and variance $\sigma^2/n$. Under the same assumption that the sample size is large, it is reasonable to claim that $S^2$ is a very precise estimate of the population variance. If we assume this, we know the standard deviation of $\bar{X}$, and we can use the confidence interval defined by \ref{eqn:zint} (implemented by the TI-89 \guimenu{ZInterval} function). \section{TI-89 Functions} \label{sec:ti89ci} The main TI-89 set of functions supporting interval estimation (other than the functions used for calculating sample statistics) is the \key{[F7] Ints} menu, which includes functions for Z and T-based confidence intervals on the mean (among others). These functions allow the interval to be calculated directly from sample data, or from previously computed sample statistics. The \key{[F5] Distr} menu's \key{2: Inverse} submenu includes functions for computing the critical values of the Normal, Student's T, and $\chi^2$ distributions. \begin{tip} The various inverse functions ask for the \key{AREA} (probability) at which the inverse is to be calculated. This area is the probability that the random variable is \emph{less than} the returned inverse value. This is consistent with the general definition of a \ac{CDF}. However, the critical values of a distribution are defined in terms of the probability that the random variable is \emph{greater than} the critical value. The translation between the two is, of course, that the area above the critical value is 1 minus the area the inverse function is expecting. \end{tip} This difference can be ignored by taking the absolute value of the resulting critical value---if the distribution is symmetric around zero. Because this relationship does \emph{not} hold true for distribution not symmetric about zero (i.e. the $\chi^2$ distribution or the general normal distribution), relying on this property can lead the student into mistakes. The \key{5: 1-PropZInt} menu can be used to calculate confidence intervals on the population proportion of a binomial distribution. However, this function appears to use the approximate formula defined by Devore \cite[p.~291]{Devore5} in Equation~7.11 (which is the standard form used by most texts rather than the more exact form defined in Equation~7.10. There do not appear to be direct functions for the calculation of $\chi^2$ confidence intervals on variance. The \key{[F5] Distr} menu's \key{2: Inverse} submenu does include an \key{Inverse Chi-square} function which can be used to provide the Chi-squared critical values needed to compute the confidence intervals, however. The \key{chi2gui} calculator program is designed to fill this lack, and functions in a manner similar to the built-in TI-89 programs. \chapter{Hypothesis Testing} \label{chap:hypothesis} The \key{[F6] Tests} menu includes applications for (among others), Z and T-based hypothesis tests. These tests allow the test statistic to be provided, or to be computed from data entered in one of the lists. In all cases, the calculator provides the $p$-value relevant to the test, rather than drawing a conclusion. \appendix \chapter{Program and Function Reference} \label{chap:refpages} This Appendix provides use information for selected TI-89 programs, including functions provided with the calculator, those belonging to the \app{Statistics with List Editor} application, and those provided in calculator programs defined in this document. Implementation details are provided for functions and programs defined by this document. This includes a complete listing of the calculator code implementing them. See Appendix~\ref{chap:prog} for further details on the mechanics of this process. \section{General Notes on the Statistics with List Editor} The TIStat applications (belonging to the \StatsLE\ flash application) need their own reference pages; the application manual (\cite{TI-89STATSLE}) does not describe how to use the applications from the Home screen, although they are available from the \key{CATALOG} screen as well as from the \key{MA206()} program. To some extent, this document attempts to fill that gap, at least with respect to the applications used in the basic probability and statistics course. Students using the \key{TIStat.} applications should note that most of them store their outputs to the \key{statvars} directory. \section{``Features'' of TI-89 Basic Programs} \label{sec:features} \subsection{Auto-Alock} It is a sometimes annoying feature of the TI-89 that when the user is placed in a dialog box, the alpha lock is automatically turned on. While this behavior is reasonable if the actual data being requested is a string. But for many math programs (including most or all of the ones defined by this document) it means you must first press the \key{$\alpha$} key to turn the $\alpha$-lock back off. If this behavior really irritates you, the ``Auto Alpha-Lock Off'' program by Kevin Kofler (available from \url{www.ticalc.org}) can reportedly prevent it. \section{MA206 Custom Menu} \subsection{Name} \key{MA206()} --- Set up a custom menu allowing easy access to functions commonly used in the basic probability and statistics course. \subsection{Description} This program sets up a TI-89 \dfn{custom menu}, which allows function names to be easily inserted into the Entry Line \begin{tip} Function and program names can also be easily pasted into the Entry Line by using the \key{CATALOG} key. Once in the Catalog window, pressing \key{[F3] Flash Apps} will bring up a list of the functions installed by any flash applications, and \key{[F4] User-Defined} will bring up a list of user defined functions. \end{tip} \begin{tip} When a function has been highlighted in either the \key{[F3] Flash Apps} or \key{[F2] Built-in} panes of the Catalog window, pressing \key{[F1] Help} will bring up a terse description of the inputs for the function. \end{tip} \subsection{Usage} \subsubsection{Inputs} This program has no inputs. \subsubsection{Outputs} This program reconfigures the custom menu of the TI-89. It has no other outputs. \subsubsection{Example} \subsection{TI-89 Implementation} This, and other programs defined by this document, are shown in the form exported by the \key{TI-89 Graph Link} program. Copies of the ASCII version of the program are found in the output directory, and can be imported into \key{Graph Link}. @O MA206.TXT @{\START92\ \COMMENT= \NAME=MA206 \FILE=MA206.89P () Prgm \(C)\ ARGS: none; Set up MA206 menu \(C)\ Program to set up an MA206 custom menu \(C)\ Rev 3.4 23 JUN 02 \(C)\ D/MathSci USMA (Mark Wroth) Custom @} The \key{Tools} menu is used for functions that manipulate the calculator itself. The \key{MA206} entry reloads the custom menu (primarily for use in debugging). @O MA206.TXT @{Title "Tools" Item "NewProb" Item "MA206()" Item "CustmOff" Item "autoaoff()" Item "uninevhk()" @} The last two menu items are useful only if you have installed the \key{autoaoff} assembly program. See Section~\ref{sec:autoaoff} for discussion of this program.\index{autoaoff} The \key{uninevhk} (for ``uninstall event hook'') function is part of the same package, and uninstalls \key{autoaoff}, restoring the default behavior of the calculator. The \key{Calc} menu provides easy access to functions commonly needed in calculations. @O MA206.TXT @{Title "Calc" Item "\integral\(" Item "\Sigma\(" Item "\root\(" @} The \key{Counting} menu provides access to several functions used specifically in counting problems. All of these functions are built in to the TI-89; this menu just makes accessing them convenient. @O MA206.TXT @{Title "Counting" Item "nPr(" Item "nCr(" Item "!" @} The \key{Distr} menu provides command line access to several functions related to computing probabilities directly from the command line. @O MA206.TXT @{Title "Distr" Item "ma206\binomGUI()" Item "TIStat.PoissPdf(" Item "TIStat.PoissCdf(" Item "ma206\hypergeo()" Item "ma206\expGUI()" Item "ma206\unifGUI()" Item "ma206\NormCDF()" @} The \key{Distr} menu provides command line access to functions related to computing confidence intervals. @O MA206.TXT @{Title "Intvl" Item "TIStat.zInt(" Item "TIStat.tInt(" Item "TIStat.zInt_1P(" Item "BinomCI()" Item "Chi2GUI()" @} Finally, the \key{Functions} menu provides command line access to some of the functions underlying the other menus, specifically including the \ac{PDF} and CDF functions. @O MA206.TXT @{Title "Functions" Item "TIStat.binomPdf(" Item "TIStat.binomCdf(" Item "ma206\hygeoPdf(" Item "ma206\hygeoCdf(" Item "ma206\expCdf(" Item "ma206\unifCdf(" Item "TIStat.normCdf(" Item "Chi2Int(" EndCustm CustmOn EndPrgm \STOP92\ @} \section{Binomial Distribution} \label{sec:binomgui} \subsection{Name} \key{binomGUI}, \key{TIStat.binomCdf} -- These GUIs compute the probability that a binomial random variable lies in the specified (closed) interval. The \key{binomGUI} program provides access to the \key{binomCdf} program from the \key{Home} command line. \index{binomial distribution} \index{probability distributions!binomial} \subsection{Usage} \subsubsection{Inputs} \begin{varlist} \key{n} The number of trials \key{p} The probability of success on each trial \key{Lower Value} The lower endpoint of the interval over which the binomial probability is desired. \key{Upper Value} The endpoint of the interval over which the binomial probability is desired. \end{varlist} The input dialog from \key{binomGUI} is shown in Figure~\ref{fig:binomial-input}. The dialog box from the \key{Binomial CDF} application is similar. \begin{figure}[htbp] \begin{center} \includegraphics{./figs/bin_inp.tif} \caption{\key{binomGUI} input screen} \label{fig:binomial-input} \end{center} \end{figure} \subsubsection{Outputs} \begin{figure}[htbp] \begin{center} \includegraphics{./figs/bin_out.tif} \caption{\key{binomGUI} output screen} \label{fig:binomial-output} \end{center} \end{figure} \subsubsection{Example} \subsection{TI-89 Implementation} @O BINOMGUI.TXT @{\START92\ \COMMENT= \NAME=BinomGUI \FILE=BINOMGUI.89P () Prgm \(C)\ ARGS: none; Binomial probabilities \(C)\ Compute interval probabilities \(C)\ for a binomial distribution \(C)\ USES: TIStat.binomCdf \(C)\ Rev 1.2 21 JUN 02 \(C)\ D/Math Sci (Mark Wroth) local n,p,lo,hi,cdf Dialog Title "Binomial Probabilities" Request "Num Trials, n ",n Request "Prob Success, p ",p Request "Lower Value ",lo Request "Upper Value ",hi EndDlog If ok=1 Then expr(lo)\->\lo expr(hi)\->\hi expr(n)\->\n expr(p)\->\p lo\->\statvars\LowVal hi\->\statvars\UpVal n\->\statvars\n p\->\statvars\p TIStat.binomCdf(n,p,lo,hi)\->\statvars\Cdf format(statvars\Cdf,"f5")\->\cdf string(statvars\LowVal)\->\lo string(statvars\UpVal)\->\hi string(statvars\n)\->\n string(statvars\p)\->\p Dialog Title "Binomial Probability" Text "P( "&lo&" \<=\ X \<=\ "&hi&" ) = "&cdf Text " " Text "n = "&n Text "p = "&p EndDlog EndIf EndPrgm \STOP92\ @} \section{Hypergeometric Distribution} \label{sec:hypergeo} \subsection{Name} hypergeo --- Compute probabilities related to a hypergeometric distribution, specifically the probability that a hypergeometric random variable lies between two constants a and b, inclusive. \index{hypergeometric distribution} \subsection{Usage} \subsubsection{Description} \key{hypergeo} is a program which prompts the user for the parameters of a hypergeometric distribution and the endpoints of an interval, and then computes the probability that the random variable lies in that interval. The hypergeometric distribution models a situation where a sample is taken from a finite population consisting of a fixed number of successes and failures \textit{without} replacement. The random variable is the number of successes drawn in the sample. The format of the program is intended to be similar to the format used in the Statistics with List Editor application. \subsection{Usage} The \key{hypergeo} program creates a requester that prompts the user for the necessary inputs and displays its outputs in another requester. \subsubsection{Inputs} The input requester for \key{hypergeo} is shown in Figure~\ref{fig:hypergeo-input}. \begin{figure}[htbp] \begin{center} \includegraphics{./figs/hypergeo.tif} \caption{\key{hypergeo} input screen} \label{fig:hypergeo-input} \end{center} \end{figure} \begin{varlist} \key{Sample size} The size of the sample drawn. \key{Pop size} The total size of the population from which the sample is drawn. \key{Successes} The number of successes in the population. \key{lower limit} The lower limit of the interval for which the probability is desired. \key{upper limit} The upper limit of the interval for which the probability is desired. \end{varlist} \subsubsection{Outputs} The primary output of the program is the probability that the random variable lies in the closed interval [a,b]. The program also echoes the parameters entered into the program as a check on data entry error. An example of the output requester that displays this information is shown in Figure~\ref{fig:hypergeo-output} \begin{figure}[htbp] \begin{center} \includegraphics{./figs/hyp_out.tif} \caption{\key{hypergeo} output screen} \label{fig:hypergeo-output} \end{center} \end{figure} \subsection{Example} \subsection{TI-89 Implementation} @O hypergeo.txt @{\START92\ \COMMENT= \NAME=hypergeo \FILE=HYPERGEO.89P () Prgm \(C)\ ARGS: none; Hypergeometric prob (GUI) \(C)\ Rev 2.3 21 JUN 02 \(C)\ D/MathSci USMA (Mark Wroth) Local n,succ,pop,a,b,prob,usrmode getMode("ALL")\->\usrMode setMode("Exact/Approx","APPROXIMATE") Dialog Title "Hypergeometric Distn" Request "Sample size:",n Request "Pop size:",pop Request "Successes:",succ Request "lower limit:",a Request "upper limit:",b EndDlog expr(n)\->\n expr(pop)\->\pop expr(succ)\->\succ expr(a)\->\a expr(b)\->\b \(C)\ Check inputs \(C)\ not implemented \(C)\ Compute If a\prob Else 40\->\main\err PassErr EndIf \(C)\ Display probability Dialog Title "Hypergeometric Distn ..." Text "P("&string(a)&"\<=\X\<=\"&string(b)&")="&string(prob) Text " " Text "n = "&string(n)&" N = "&string(pop)&" M = "&string(succ) EndDlog setMode(usrMode) EndPrgm \STOP92\ @} \section{hygeopdf} \subsection{Name} \key{hygeopdf} --- Evaluate the \ac{PMF} of a hypergeometric random variable. \index{hypergeometric distribution!probability mass function} \subsection{Description} \key{hygeopdf(x, n, succ, pop)} computes the probability that a hypergeometric random variable with sample size \key{n}, possible number of successes \key{succ}, and population size \key{pop} assumes the value \key{x}. The hypergeometric \ac{PDF} is defined in Equation~\ref{eqn:hypergeopdf}. \subsection{Usage} \subsubsection{Inputs} \begin{varlist} \key{x} The value at which the \ac{PDF} is to be evaluated. \key{n} The sample size. \key{succ} The total number of successes in the population. \key{pop} The total number of elements (successes and failures) in the population. \end{varlist} \subsubsection{Outputs} \begin{varlist} \key{probability} The \ac{PDF} value. \end{varlist} \subsection{Example} To find the probability that a random variable from a hypergeometric distribution with a population size of 50 with 15 successes and a sample size of 10 has exactly 5 successes: \begin{enumerate} \item Enter {\small hygeopdf(5.,10,15,50) in the entry line of the \textbf{Home}} {\small window.} \item Press \key{Enter} \item The expression you entered and the answer, \key{.094903}, will be displayed in the History Area. \end{enumerate} \begin{Note} If you enter all of the parameters using exact forms, the calculator will display the exact answer (in this case 904332/9529015). Entering any parameter using a decimal form (the 5. in the example) cause the calculator to provide the approximate answer. \end{Note} \subsection{TI-89 Implementation} Because of the very simple definition of {\small hygeocdf(), it is important that we define hygeopdf() to return zero for invalid values of x. It is also appropriate to test for invalid parameter inputs; an invalid input here can propogate up to the CDF.} @O hygeoPdf.txt @{\START92\ \COMMENT= \NAME=hygeopdf \FILE=HYGEOPDF.89P hygeopdf(x,n,succ,pop) Func \(C)\ ARGS: (x,n,succ,pop) Hypergeometric PDF \(C)\ \(C)\ Rev 2.0 20 JUN 02 \(C)\ D/MathSci USMA (Mark Wroth) If n>pop or succ>pop Then Return "'Invalid parameters" EndIf If max(0,n-pop+succ)\<=\x and x\<=\ min(n,succ) Then nCr(succ,x)*nCr(pop-succ,n-x)/(nCr(pop,n)) Else 0 EndIf \(C)\ hypergeometric RV \(C)\ Rev 1.1 \(C)\ Mark Wroth EndFunc \STOP92\ @| hygeoPdf @} \section{hygeocdf} \subsection{Name} \key{hygeocdf} --- Evaluate the CDF of a hypergeometric random variable. \index{hypergeometric distribution!cumulative distribution} \subsection{Description} \key{hygeocdf(x, n, succ, pop)} computes the probability that a hypergeometric random variable with sample size \key{n}, possible number of successes \key{succ}, and population size \key{pop} assumes a value less than or equal to \key{x}. The hypergeometric PMF is defined in Equation~\ref{eqn:hypergeopdf}; the CDF is \begin{equation} \label{eq:hypergeocdf} P_H(x) = \sum_{i=0}^x \frac{\nCr(Succ,i) \nCr(Pop-Succ,n-i)}{\nCr(Pop,n)} \end{equation} where \begin{varlist} \key{Pop} is the number of elements in the population, \key{Succ} is the number of elements coded ``success'', \key{n} is the sample size. \end{varlist} Unlike the \ac{PDF}, there are no limits (in principle) on $x$, although some care is needed to ensure that the function behaves properly at all values. \subsection{Usage} This function is called directly from the \key{Home} command line; the program \key{hypergeo} (Section~\ref{sec:hypergeo}), also called from the command line, produces a requester to prompt the user for the necessary inputs. \subsubsection{Inputs} \begin{varlist} \key{x} The value at which the CDF is to be evaluated. \key{n} The sample size. \key{succ} The total number of successes in the population. \key{pop} The total number of elements (successes and failures) in the population. \end{varlist} \subsubsection{Outputs} \begin{varlist} \key{probability} The CDF value. \end{varlist} \subsection{Example} To find the probability that a random variable from a hypergeometric distribution with a population size of 50 with 15 successes and a sample size of 10 has 5 or fewer successes: \begin{enumerate} \item Enter \key{hygeocdf(5.,10,15,50)} in the entry line of the \key{Home} \key{window}. \item Press \key{Enter} \item The expression you entered and the answer, \key{.969998}, will be displayed in the History Area. \end{enumerate} \begin{Note} If you enter all of the parameters using exact forms, the calculator will display the exact answer (in this case 2813126/2900135). Entering any parameter using a decimal form (the 5. in the example) cause the calculator to provide the approximate answer. \end{Note} \subsection{TI-89 Implementation} The \ac{CDF} for the Hypergeometric can be implemented easily given the existence of a \ac{PDF} function which correctly returns zero for values of x which violate the side conditions (see ?). @O HYGEOCDF.TXT @{\START92\ \COMMENT= \NAME=hygeoCdf \FILE=HYGEOCDF.89P hygeoCdf(x,n,succ,pop) Func \(C)\ ARGS: (x,n,succ,pop); CDF for a Hypergeometric RV \(C)\ USES: hygeoPdf \(C)\ Rev 1.1 \(C)\ Mark Wroth \Sigma\(hygeoPdf(i,m,succ,pop),i,0,x) EndFunc \STOP92\ @| hygeoCdf @} We depend on the error checking of \key{hygeopdf()} to catch any parameter errors, so the CDF does not need to do any independent error checking. The \verb+\(C)\+ symbol represents the TI-89 comment symbol (see Appendix~\ref{chap:prog}). \section{unifcdf} \label{sec:unifcdf} \subsection{Name} \key{unifcdf} --- Evaluate the CDF of a uniformly distributed random variable. \index{uniform distribution!cumulative distribution} \subsection{Description} This function evaluates the CDF of a uniformly distributed random variable, defined as \begin{equation} \label{eq:unifcdf} F(x) = \left\{ \begin{array}{cl} 0 & x < 0 \\ \frac{x-a}{b-a} & a \le x \le b \\ 1 & x > b \\ \end{array} \right. \end{equation} \subsection{Usage} \subsubsection{Inputs} \begin{description} \item[\key{x}] The value at which the CDF is to be evaluated. \item[\key{a}] The lower limit of the region for which the \ac{PDF} is non-zero. \item[\key{b}] The upper limit of the region for which the \ac{PDF} is non-zero. \end{description} \subsubsection{Outputs} \begin{description} \item[cdf] Cumulative probability, the probability that a uniformly distributed random variable with the specified parameters is less than or equal to \textit{x}. \end{description} \subsection{Example} To find the probabilitity that a random variable uniformly distributed between 1 and 10 is less than 5: \begin{enumerate} \item Enter \key{unifcdf(5.,1,10)} in the entry line of the \key{Home} window. \item Press \key{Enter} \item The expression you entered and the answer, \key{.444444}, will be displayed in the History Area. \begin{Note} If you enter all of the parameters using exact forms, the calculator will display the exact answer (in this case 4/9). Entering any parameter using a decimal form (the 5. in the example) cause the calculator to provide the approximate answer. \end{Note} \end{enumerate} \subsection{TI-89 Implementation} @O unifcdf.txt @{\START92\ \COMMENT= \NAME=unifCdf \FILE=UNIFCDF.89P (x,a,b) Func \(C)\ ARGS: (x,a,b) CDF for a Uniform RV on [a,b] \(C)\ Rev 1.1 2002-06-15 \(C)\ Mark Wroth If ab Then Return 1 Else (x-a)/(b-a) EndIf Else "Parameters a < b" EndIf EndFunc \STOP92\ @} \section{expcdf} \label{sec:expcdf} \subsection{Name} \key{expcdf} --- Evaluate the \ac{CDF} of an exponentially distributed random variable. \index{exponential distribution!cumulative distribution} \subsection{Description} This function implements the \ac{CDF} for an exponentially distributed random variable with parameter $\lambda$. Such a random variable has \ac{PDF} \begin{equation} \label{eqn:expcdf} f(x) = \lambda e^{-\lambda x} \end{equation} \subsection{Usage} \subsubsection{Inputs} \begin{description} \item[\key{x}] The value of the random variable at which the CDF is to be evaluated. \item[{$\lambda$}] The parameter of the distribution. $\lambda$ is one over the mean of the distribution. \end{description} \subsubsection{Outputs} \begin{description} \item[\key{cdf}] Cumulative probability; the probability that the random variable is less than or equal to the supplied \textit{x}. \end{description} If an invalid parameter $\lambda$ is supplied, an error string is returned, rather than a numeric result. \subsection{Example} To compute the probability that an exponentially distributed random variable with mean 5 is less than or equal to 3: \begin{enumerate} \item Enter \key{expcdf(3.,1/5)} in the entry line of the \key{Home} window. \item Press \key{Enter} \item The expression you entered and the answer, \key{.451188}, will be displayed in the History Area. \begin{Note} If you enter both parameters using exact forms, the calculator will display the exact answer (in this case 1-e$^{-3/5}$). Entering either parameter using a decimal form (the 3. in the example) cause the calculator to provide the approximate answer. \end{Note} \end{enumerate} \subsection{TI-89 Implementation} The \key{expcdf()} function wraps a simple call to the usual mathematical definition inside two tests. The first of these tests checks that the required parameter $\lambda$ is greater than zero, as required by the definition of the function. The second test checks whether the input value \key{x} is greater than or less than zero, branching to the two piecewise definitions of the CDF depending on the result. Both tests use the \key{where()} function, which is in essence a simple branching structure. @O EXPCDF.TXT @{\START92\ \COMMENT= \NAME=expCdf \FILE=EXPCDF.89P (x,\lambda\) Func \(C)\ ARGS: (x,\lambda\) CDF of an exponential RV \(C)\ with parameter \lambda\ \(C)\ Rev 1.1 2002-06-15 \(C)\ D/MathSci USMA (Mark Wroth) when(\lambda\>0, when(x\>=\0,1-\e\^(\(-)\\lambda\*x),0),"\lambda\ must be > 0") EndFunc \STOP92\ @| expCdf@} \section{Exponential Probability GUI} \label{sec:expgui} \subsection{Name} \index{exponential distribution!confidence intervals} \key{expgui}---Produce confidence intervals on the variance or standard deviation of a Normal random variable. \subsection{Usage} \subsection{TI-89 Implementation} \label{sec:expgui-implementation} @O EXPGUI.TXT @{ \START92\ \COMMENT= \NAME=expGUI \FILE=EXPGUI.89P () Prgm \(C)\ ARGS: none; Exponential probabilities (GUI) \(C)\ Rev 1.0 2002-06-15 \(C)\ D/MathSci USMA (Mark Wroth) Local lo,hi,\lambda\,cdf,usrmode getMode("ALL")\->\usrMode setMode("Exact/Approx","APPROXIMATE") Dialog Title "Exponential Distn" Request "Lower bound",lo Request "Upper bound",hi Request "\lambda\ ",\lambda\ EndDlog If ok=1 Then expr(lo)\->\lo expr(hi)\->\hi expr(\lambda\)\->\\lambda\ (ExpCDF(hi,\lambda\)-ExpCDF(lo,\lambda\))\->\cdf Dialog Title "Exponential Distn ..." Text "P("&string(lo)&" \<=\ X \<=\ "&string(hi)&") = "&format(cdf,"f4") Text " " Text "\lambda\ = "&string(\lambda\) EndDlog setMode(usrMode) EndIf EndPrgm \STOP92\ @| expGUI \lambda\@} \section{Confidence Intervals on the Binomial Proportion} \label{sec:binomialci} \subsection{Name} \key{TIStat.zInt\_1P(x, n, clevel} --- compute confidence interval on the population proportion for a binomial distribution. \index{binomial distribution!confidence interval} \key{BinomCI()} --- Calculate and store a confidence interval on the population proportion for a binomial distribution using \cite[Equation~7.10]{Devore5}. \subsection{Discussion} There are two different formulas for a confidence interval on a population proportion given by Devore\nocite{Devore5} in equations~7.10 and 7.11. The TI-89 computes a confidence interval for the population, but the documentation does not specify which formula it uses. The two formul{\ae} are: \begin{equation} \label{eqn:7.10} \frac{\phat+\frac{z^2_{\alpha/2}}{2n}\pm z_{\alpha/2}\sqrt{\frac{\phat\qhat}{n}+\frac{z^2_{\alpha/2}}{4n^2}}}% {1+(z^2_{\alpha/2})/n} \end{equation} valid for all $n$\footnote{Devore, citing \cite{Agresti}, indicates that this expression gives a more accuract confidence interval than Equation~\ref{eqn:7.11} and the side conditions need not be checked for this form.} and \begin{equation} \label{eqn:7.11} \phat \pm z^2_{\alpha/2} \sqrt{\phat\qhat/n} \end{equation} valid when $n\hat{p}\ge10$ and $n\hat{q}\ge10$. To determine which equation the TI-89 uses, we take a simple test case. Since the approximation given by Equation~\ref{eqn:7.11} will improve with larger $n$, we will choose as our test case $n=2$ and number of successes 1. With this assumption, $\phat = \qhat = 0.5$. Selecting $\alpha=0.5$ (and hence $z_{\alpha/2} = 0.67449$), we have now determined the values we need to use for our calculations. Using Matlab as a calculator, the lower limit calculated with Equation~\ref{eqn:7.10} is 0.28475881963799. The equivalent value for Equation~{eqn:7.11} is 0.26153177357874. Applying the 1 Proportion Z Interval function of the TI-89 with $Success=1$, $n=2$, and $CI=0.5$, the calculator returns a confidence interval of $(0.2615, 0.7385)$. Since Equation~\ref{eqn:7.10} would have returned (at that level of precision) 0.2753 and Equation~\ref{eqn:7.11} would have returned 0.2615, we can conclude that the calculator uses Equation~\ref{eqn:7.11} or something very similar to it. \subsection{Usage} There are three different ways to access this basic functionality: \begin{itemize} \item Select the \StatsLE\ \key{F7 Ints} menu item \key{5: 1-PropZInt} and fill in the required values. Outputs are displayed in a dialog box and stored in the \key{StatVars} directory. \item Enter at the command line \key{TIStat.Zint\_1P(x,n,clev)}. Outputs are stored in the \key{StatVars} directory, but not displayed. \item Enter at the command line \key{ma206/binomCI()} and fill in the required values in the resulting dialog box. Outputs are displayed in a dialog box and stored in the \key{StatVars} directory. \end{itemize} Both all three methods take (by design) essentially the same inputs and provide the same outputs; they are adapted to different user interfaces and slightly different underlying equations (as discussed above). In general, use \key{binomCI} is slightly preferable; it is definitely preferred when $n$ is not ``large''. \subsubsection{Inputs} \begin{varlist} \key{x} Number of observed successes \key{n} Number of trials \key{clev} The desired confidence level. \end{varlist} \begin{figure}[htbp] \begin{center} \includegraphics{./figs/binci_in.tif} \caption{\key{BinonCI} input screen} \label{fig:binomci_inputs} \end{center} \end{figure}\begin{figure}[htbp] \begin{center} \includegraphics{./figs/1PropZin.tif} \caption{\key{1-PropZInt} input screen} \label{fig:1-PropZInt_inputs} \end{center} \end{figure} \subsubsection{Outputs} \begin{varlist} \key{statvars{\textbackslash}lower} Lower end of the CI. \key{statvars{\textbackslash}upper} Upper end of the CI. \end{varlist} \begin{figure}[htbp] \begin{center} \includegraphics{./figs/binci_ou.tif} \caption{\key{BinonCI} output screen} \label{fig:binomci_outputs} \end{center} \end{figure}\begin{figure}[htbp] \begin{center} \includegraphics{./figs/1PropZou.tif} \caption{\key{1-PropZInt} output screen} \label{fig:1-PropZInt_outputs} \end{center} \end{figure} \subsubsection{Example} To compute a 90\% confidence interval on the population proportion, given 5 successes out of 10~trials, enter \begin{varlist} \key{Observed Successes} 5 \key{Number of Trials} 10 \key{Confidence Level} .9 \end{varlist} as shown in Figure~\ref{fig:binomci_inputs} (for the \key{binomCI} program) or Figure~\ref{fig:1-PropZInt_inputs} (for the \key{1-PropZint} program). The results, a CI of $(0.28476, 0.71524)$ from \key{binomCI} (shown in Figure~\ref{fig:binomci_outputs}), or $(0.2615, 0.7385)$ from \key{1-PropZInt} (shown in Figure~\ref{fig:1-PropZInt_outputs}). As discussed above, the difference in the outputs is due to the implementing equations and the very small sample size chosen for the example. \subsection{TI-89 Implementation (binomCI)} @O BINOMCI.TXT @{\START92\ \COMMENT= \NAME=BinomCI \FILE=BINOMCI.89P () Prgm \(C)\ ARGS: none; CI on a binomial proportion (GUI) \(C)\ Rev 2.0 2002-06-18 \(C)\ D/MathSci USMA (Mark Wroth) Local x,n,clev,p_hat,z,t1,t2,t3,lower,upper string(statvars\x)\->\x string(statvars\n)\->\n string(statvars\clevel)\->\clev Dialog Title "Binomial Confidence Interval" Request "Observed Successes",x Request "Number of Trials",n Request "Confidence Level",clev EndDlog If ok=1 Then expr(x)\->\statvars\x expr(n)\->\statvars\n expr(clev)\->\statvars\clevel expr(x)\->\x expr(n)\->\n expr(clev)\->\clev x/n\->\p_hat p_hat\->\statvars\p_hat invNorm(1-(clev/2))\->\z z*\root\((p_hat)*(1-p_hat)/n+z^2/(4*n^2))\->\t1 (1+z^2/n)\->\t2 p_hat+z^2/(2*n)\->\t3 (t3-t1)/t2\->\statvars\lower (t3+t1)/t2\->\statvars\upper format(statvars\lower,"f5")\->\lower format(statvars\upper,"f5")\->\upper Dialog Title "Binomial CI" Text "CI = ( "&lower&" , "&upper&" )" Text " " Text "Confidence Level: "&string(statvars\clevel) Text "successes = "&string(x)&" trials = "&string(n) Text "p_hat = "&format(Statvars\p_hat,"f4") EndDlog EndIf EndPrgm \STOP92\ @| binomCI @} \section{Confidence Intervals on Variance---chi2int} \subsection{Name} \key{chi2int} --- The \key{chi2int()} program (and its companion \key{chi2gui()}, which provides a graphical user interface to the program) computes confidence intervals on the population variance or standard deviation. \subsection{Usage} \subsubsection{Inputs} This function can be called in either of two ways: from the Home command line, as \key{chi2int(n,s2,clevel,type)} or by calling \key{chi2gui()}. If the \key{chi2int} for is used, the input arguments are: \begin{varlist} \key{n} The number of samples in the sample. \key{s2} The sample variance. \key{clevel} The desired confidence level for the confidence interval. \key{type} The type of interval desired, where \texttt{1} indicates a confidence interval on the variance, and \texttt{2} a confidence interval on the standard deviation. \end{varlist} If the \key{chi2gui()} form is used, there are no command line inputs; the program will raise a requester to allow the user to supply the needed values. \subsubsection{Outputs} The \key{chi2int} program provides its outputs in two forms: a graphical requester that provides the requested confidence interval and echoes the user inputs, and by storing the user inputs and the desired confidence interval endpoints in the \key{statvars} directory. The set of stored variables are different for the \key{chi2int} and the \key{chi2gui} programs. The chi2int stores: \begin{varlist} \key{statvars{\textbackslash}lower} The lower end of the desired confidence interval. \key{statvars{\textbackslash}upper} The upper end of the desired confidence interval. \end{varlist} In addition, the \key{chi2gui} will store the following user inputs to the indicated variables (and will use the values in those variables as the default choices when it opens). \begin{varlist} \key{statvars{\textbackslash}n} The sample size \key{statvars{\textbackslash}ssdevx} The sample standard deviation (square root of the entered sample variance. \key{statvars{\textbackslash}clevel} The confidence level. \end{varlist} \subsection{Example} Given a sample of size n = 17, and a sample variance of 137,324.3, compute a 95\% confidence interval on the population variance. \begin{enumerate} \item Begin at the Home screen. \item Enter the command \key{chi2int(17,137324.3,.95,1)} and press \key{Enter}. \begin{tip} As a shortcut to entering the command name, use the Catalog function and select the F4 User-Defined tab. Then select the desired function from the list. \end{tip} \item Read the confidence interval (76171.3, 318080) on the resulting requester. \end{enumerate} Alternatively, using the \key{chi2gui} to solve the same problem: \begin{enumerate} \item Start the \key{chi2gui} by entering \key{chi2gui()} at the \key{Home} screen. \item Enter the values for n, the sample variance, and the confidence level in the open requesters. \item Select the desired confidence interval type from the drop down menu. \item Press \key{Enter}. \item Read the confidence interval (76171.3, 318080) on the resulting requester. \end{enumerate} \begin{Note} This is Example~7.15 from \cite{Devore5}. However, the use of the full accuracy of the Chi-squared inverse function rather than the five significant figures available from a set of tables results in a slightly different answer than Devore obtains. \end{Note} \subsection{TI-89 Implementation} @O chi2int.txt @{\START92\ \COMMENT= \NAME=chi2int \FILE=CHI2INT.89P chi2int(n,s2,clevel,type) Prgm \(C)\ ARGS: (n,s\2\,clevel,type) Chi\2\ CI (type 1 on var, 2 on SD) \(C)\ Rev 1.2 2002-06-15 \(C)\ D/MathSci USMA (Mark Wroth) local l,u,stsr (n-1)*s2/(tistat.invchi2(1-(1-clevel)/2,n-1))\->\l (n-1)*s2/(tistat.invchi2((1-clevel)/2,n-1))\->\u "CI on \sigma\\^2\"\->\tstr If type=2 Then \root\(l)\->\l \root\(u)\->\u "CI on \sigma\"\->\tstr EndIf Dialog Title tstr Text "Cint = ( "&string(l)&" , "&string(u)&" )" Text "n = "&string(n)&" S\^2\ = "&string(s2) EndDlog l\->\statvars\lower u\->\statvars\upper \root\(s2)\->\statvars\ssdevx clevel\->\statvars\clevel EndPrgm \STOP92\ @| chi2int clevel lower upper @} \section{Normal CDF} \label{sec:normcdf} \subsection{Name} \key{normCDF} is a user-defined program that partially duplicates the function of \key{TIStat.normCdf}. The primary use for this function is to be pasted into the \key{Home} screen command line and provide a GUI for data entry and results. \subsection{Usage} \subsection{TI-89 Implementation} @O NORMCDF.TXT @{\START92\ \COMMENT= \NAME=NormCDF \FILE=NORMCDF.89P () Prgm \(C)\ ARGS: none; Normal probs (GUI) \(C)\ Compute normal probabilities \(C)\ using the Gaussian (Normal) distn \(C)\ REQUIRES: TIStat.NormCDF \(C)\ Rev 1.0 2002-06-15 \(C)\ D/MathSci USMA (Mark Wroth) Local lo,hi,\mu\,\sigma\,cdf getMode("ALL")\->\usrMode setMode("Exact/Approx","APPROXIMATE") Dialog Title "Normal CDF" Request "Lower Value ",lo Request "Upper Value ",hi Request "\mu\ ",\mu\ Request "\sigma\ ",\sigma\ EndDlog If ok=1 Then expr(lo)\->\lo expr(hi)\->\hi expr(\mu\)\->\\mu\ expr(\sigma\)\->\\sigma\ TIStat.normCDF(lo,hi,\mu\,\sigma\)\->\cdf lo\->\statvars\lo hi\->\statvars\hi \mu\\->\statvars\\mu\ \sigma\\->\statvars\\sigma\ cdf\->\statvars\cdf Dialog Title "Normal CDF" Text "CDF = "&string(cdf) Text " " Text "Lower Value = "&string(lo) Text "Upper Value = "&string(hi) Text "\mu\ = "&string(\mu\) Text "\sigma\ = "&string(\sigma\) EndDlog EndIf setMode(usrMode) EndPrgm \STOP92\ @| NormCDF @} \chapter{Installation} \label{chap:installation} This document assumes that you have successfully installed the \StatsLE\ application. This may also have required you to install a newer version of the operating system itself. If you need help with these procedures, see Appendix~\ref{chap:upgrade}. Depending on what you have available, there are several possible approaches to the problem of installing the programs this document creates. The obvious ones are: \begin{itemize} \item Copy them from another TI-89 that already has them installed. This is probably the easiest method---provided you have access to another calculator that already has them. Copying the programs is discussed (briefly) in Section~\ref{sec:prg-copy} and in the calculator documentation. \item Upload them from a personal computer. This is fairly straightforward, provided you have a computer and the necessary connecting cable. This approach is discussed in Sections~\ref{sec:prg-pctype} (entering programs via \app{TI-Graph Link}, \ref{sec:prg-lp} (importing programs from this document), and \ref{sec:pc-upload} (actually uploading the programs). \item Type them directly into the calculator. This approach is always feasible, but is also the most painful since the TI-89 is not exactly set up for the rapid entry of text. If you need to take this approach, you will need to read at least parts of Section~\ref{sec:ascii-format}, which discusses the format in which the programs are shown in this document. \end{itemize} \section{Copying Programs from Another TI-89} \label{sec:prg-copy} \section{Entering Programs in TI-Graph Link} \label{sec:prg-pctype} Typing the programs in this document into \app{TI-Graph Link} is fairly straightforard if you are already familiar with programming the TI-89. You will need to review Section~\ref{sec:ascii-format} to understand the conventions used in the ASCII format programs. \section{Extracting Programs from the Source of this Document} \label{sec:prg-lp} To extract the programs from the source of this document, \fname{\jobname.w} \begin{enumerate} \item Process the source of this document, \fname{\jobname.w}, with \key{Nuweb} by commanding \begin{alltt} nuweb \jobname.w \end{alltt} This will produce, in addition to several other intermediate files, a series of text files such as \fname{MA206.TXT}. The a list of the output files produced is in Section~\ref{sec:files} (note that it includes files such as \fname{calculator.sty} that you would \emph{not} want to upload). \end{enumerate} \section{Uploading Programs with TI-Graph Link} \label{sec:pc-upload} Before beginning upload of the programs to the calculator, create a folder on the calculator in which the programs will be stored. This document, and the \key{MA206} custom menu, assume that the programs will be stored in \key{ma206}. Make this folder current on the TI-89. \begin{enumerate} \item Start the \app{TI-Graph Link} software. \item Load the program into \app{TI-Graph Link} \begin{enumerate} \item Import the text file into \program{Graph Link} by selecting \guimenu{Tools}, then \guimenu{Import: ASCII Program ...}. Select the appropriate text file in the requester that appears, and click ``OK''. This will import the program into \program{Graph Link}. \item Load the \fname{.89p} file into \app{TI-Graph Link} by selecting \guimenu{File}, then \guimenu{Open} and selecting the desired file from the resulting requester. \end{enumerate} \item Send the program to the calculator using \program{Graph Link} (following the instructions in the \program{Graph Link} user manual, \cite[page~7ff]{GraphLink}). \end{enumerate} If you have access to the programs in the from of a TI-89 \dfn{program group}, usually named \fname{MA206PRO.89g}, they can be uploaded as a single entity. Otherwise you will have to import each of them individually and send them to the calculator. \chapter{Programming Notes} \label{chap:prog} \section{Literate Programming} Literate programming is a method of creating a computer program such that both the documentation of that program and the actual source code can be presented to human readers in a manner intended to make the program as easy to understand as possible, and correctly record the actual program as presented to the computer itself. This document is a \dfn{literate program} in the sense that the program listings found in this document are copied to disk as part of processing this document (with \app{Nuweb} \cite{nuweb}). The resulting text files can then be imported into \key{Graph Link} and ultimately downloaded to the calculator. In this manner, the version of the program displayed here is kept current with the version actually loaded on the calculator. Using this system is discussed in Appendix~\ref{chap:installation} (with regard to creating the actual calculator files) and in Appendix~\ref{chap:docprod} (with regard to producing the documentation). \section{ASCII Format for TI-89 Programs} \label{sec:ascii-format} Because of the desire to record the programs in this document, and the literate programming orientation of it, the calculator programs shown here are in the \acr{ASCII} export format of the TI-GraphLink software. The format of an \acr{ASCII} text file for a TI-89 program is, as far as I can see, undocumented. This makes editing the programs something of a challenge. In general, while I use the \acr{ASCII} storage form for inclusion in this document, most program development is done in the \program{Graph Link} editor. However, some observations can be made about the \acr{ASCII} export format. \begin{itemize} \item The backslash character, ``\verb+\+'', appears to serve as an escape character, preceding and following special characters, and preceding certain keywords at the beginning of the file. \item Certain specific characters appear to be as shown in Table~\ref{tbl:ASCII-link}. \item Note that some symbols are not the same as the obvious key symbol. This specificially includes the exponential symbol and the negation operator (which is not the same as the subtraction operator). \end{itemize} \begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|l|}\hline ASCII & Calculator & Meaning \\ \hline \verb+\(C)\+ & \copyright & Comment \\ \verb+\lambda\+ & \(\lambda\) & Greek letter \\ \verb+\mu\+ & \(\mu\) & Greek letter \\ \verb+\sigma\+ & \(\sigma\) & Greek letter \\ \verb+\->\+ & \(\rightarrow \) & Store command \\ \verb+\Sigma\+ & \(\sum\) & Summation command \\ \verb+\root\+ & \(\sqrt{}\) & Square root command \\ \verb+\e\+ & \( e \) & Exponential \\ \verb+\(-)\+ & \( - \) & Negation \\ \verb+\<=\+ & \(\le\) & Math symbol \\ \verb+\>=\+ & \(\ge\) & Math symbol \\ \hline \end{tabular} \caption{Control sequences in ASCII export files} \label{tbl:ASCII-link} \end{center} \end{table} Tables~\ref{tbl:ASCII-greek} through \ref{tbl:ASCII-international2} are an expanded version of the Table~\ref{tbl:ASCII-link} based on \cite{ascii.txt}. The general format of the ASCII program files is a header of the form \begin{verbatim} \START92\ \COMMENT= \NAME=NormCDF \FILE=NORMCDF.89P \end{verbatim} where the strings \verb|NormCDF| and |NORMCDF.89P| are replaced by the appropriate names. This is followed by the argument list in parentheses, following which is either a \verb|Prgm| \verb|EndPrgm| block or a \verb|Func| \verb|EndFunc| block. These blocks contain the appropriate program code. Finally the program ends with a trailer of the form \begin{verbatim} \STOP92\ \end{verbatim} \begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|l|c|c|l|}\hline \verb|\alpha\| & $\alpha$ & alpha & \verb|\beta\| & $\beta$ & beta \\ \verb|\Gamma\| & $\Gamma$ & capital gamma & \verb|\gamma\| & $\gamma$ & gamma \\ \verb|\Delta\| & $\Delta$ & capital delta & \verb|\delta\| & $\delta$ & delta \\ \verb|\epsilon\| & $\epsilon$& epsilon & \verb|\zeta\| & $\zeta$ & zeta \\ \verb|\theta\| & $\theta$ & theta & \verb|\lambda\| & $\lambda$ & lambda \\ \verb|\xi\| & $\xi$ & xi & \verb|\Pi\| & $\Pi$ & capital pi \\ \verb|\pi\| & $\pi$ & pi & \verb|\mu\| & $\mu$ & mu \\ \verb|\rho\| & $\rho$ & rho & \verb|\Sigma\| & $\Sigma$ & capital sigma \\ \verb|\sigma\| & $\sigma$ & sigma & \verb|\tau\| & $\tau$ & tau \\ \verb|\phi\| & $\phi$ & phi & \verb|\psi\| & $\psi$ & psi \\ \verb|\Omega\| & $\Omega$ & capital omega & \verb|\omega\| & $\omega$ & omega \\ \hline \end{tabular} \caption{Greek letters in ASCII export files} \label{tbl:ASCII-greek} \end{center} \end{table} \begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|l|c|c|l|}\hline \verb|\->\| & $\rightarrow$ & `STORE' & \verb|\option\| & $\Diamond$ & Option \\ \verb|\union\| & $\cup$ & Set union & \verb|\intersect\| & $\cap$ & Set intersect \\ \verb|\subset\| & $\subset$ & Set subset & \verb|\element\| & $\in$ & Set element \\ \verb|\ee\| & {\small E} & EE key (exponent) & \verb|\e\| & \textit{e} & italic exponential 'e' \\ \verb|\i\| & \textit{i} & imaginary number 'i' & \verb|\r\| & & radian conversion 'r' \\ \verb|\t\| & & matrix transposition 't' & \verb|\xmean\| & & stat mean of x \\ \verb|\ymean\| & & stat mean of y & \verb|\<=\| & $\le$ & less than or equal \\ \verb|\!=\| & $\ne$ & not equal to & \verb|\>=\| & $\ge$ & greater than or equal \\ \verb|\/_\| & $\angle$ & angle character & \verb|\diff\| & $d$ & differential d \\ \verb|\integral\| & \TIint & integration & \verb|\infinity\| & $\infty$ & infinity symbol \\ \verb|\root\| & $\sqrt{}$ & radical & \verb|\(C)\| %\) & \copyright & Comment symbol \\ \verb|\(-)\| %\) & $-$ & unary minus & \verb|\o\| & ${}^\circ$ & degrees symbol \\ \hline \end{tabular} \caption{Mathematical and programming operators in ASCII export files} \label{tbl:ASCII-math} \end{center} \end{table} \begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|l|}\hline \verb|\lock\| & & The LOCK character \\ \verb|\check\| & & The CHECK mark char \\ \verb|\block\| & & The centered block char \\ \verb|\from\| & & block right arrow \\ \verb|\to\| & & block left arrow \\ \verb|\up\| & & block up arrow \\ \verb|\down\| & & block down arrow \\ \verb|\leftarrow\| & & left arrow \\ \verb|\uparrow\| & & up arrow character \\ \verb|\downarrow\| & & down arrow character \\ \verb|\left\| & & big block left arrow \\ \verb|\right\| & & big block right arrow \\ \verb|\shift\| & & shift up arrow character \\ \verb|\...\| & & ellipsis (...) \\ \verb|\cent\| & & cent character \\ \verb|\pound\| & & pound sterling \\ \verb|\starburst\| & & starburst character \\ \verb|\yen\| & & yen character \\ \verb|\split\| & & split vertical bar character \\ \verb|\section\| & & section character \\ \verb|\a_\| & & feminine ord character \\ \verb|\<<\| & & double left arrow character \\ \verb|\lnot\| & & logical not character \\ \verb|\(R)\| & & registered mark character \\ \verb|\^-\| & & superscript minus character \\ \verb|\^+\| & & superscript plus character \\ \verb|\^2\| & & superscript 2 (square) \\ \verb|\^3\| & & superscript 3 (cube) \\ \verb|\^-1\| & & superscript -1 (inverse) \\ \verb|\para\| & & paragraph symbol \\ \verb|\.\| & & dot mark \\ \verb|\^x\| & & superscript x character \\ \verb|\^1\| & & superscript 1 character \\ \verb|\o_\| & & masculine ord character \\ \verb|\>>\| & & double right arrow \\ \hline \end{tabular} \caption{Special characters in ASCII export files} \label{tbl:ASCII-special} \end{center} \end{table} \begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|l|}\hline \verb|\ud!\| & & upside down exclamation \\ \verb|\ud?\| & & upside down question mark \\ \verb|\A`\| & & capital A grave \\ \verb|\A'\| & & capital A acute \\ \verb|\A^\| & & capital A circumflex \\ \verb|\A~\| & & capital A tilde \\ \verb|\A..\| & & capital A dieresis \\ \verb|\Ao\| & & capital A ring \\ \verb|\AE\| & & capital AE \\ \verb|\C,\| & & capital C cedilla \\ \verb|\E`\| & & capital E grave \\ \verb|\E'\| & & capital E acute \\ \verb|\E^\| & & capital E circumflex \\ \verb|\E..\| & & capital E dieresis \\ \verb|\I`\| & & capital I grave \\ \verb|\I'\| & & capital I acute \\ \verb|\I^\| & & capital I circumflex \\ \verb|\I..\| & & capital I dieresis \\ \verb|\-D\| & & capital D bar \\ \verb|\N~\| & & capital N tilde \\ \verb|\O`\| & & capital O grave \\ \verb|\O'\| & & capital O acute \\ \verb|\O^\| & & capital O circumflex \\ \verb|\O~\| & & capital O tilde \\ \verb|\O..\| & & capital O dieresis \\ \verb|\x\| & & times 'x' mark \\ \verb|\O/\| & & capital O slash \\ \verb|\U`\| & & capital U grave \\ \verb|\U'\| & & capital U acute \\ \verb|\U^\| & & capital U circumflex \\ \verb|\U..\| & & capital U dieresis \\ \verb|\Y'\| & & capital Y acute \\ \verb|\I>\| & & capital I (p) \\ \hline \end{tabular} \caption{Upper case international letters in ASCII export files} \label{tbl:ASCII-international1} \end{center} \end{table} \begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|l|}\hline \verb|\ss\| & & eschett \\ \verb|\a`\| & & a grave \\ \verb|\a'\| & & a acute \\ \verb|\a^\| & & a circumflex \\ \verb|\a~\| & & a tilde \\ \verb|\a..\| & & a dieresis \\ \verb|\ao\| & & a ring \\ \verb|\ae\| & & ae \\ \verb|\c,\| & & c cedilla \\ \verb|\e`\| & & e grave \\ \verb|\e'\| & & e acute \\ \verb|\e^\| & & e circumflex \\ \verb|\e..\| & & e dieresis \\ \verb|\i`\| & & i grave \\ \verb|\i'\| & & i acute \\ \verb|\i^\| & & i circumflex \\ \verb|\i..\| & & i dieresis \\ \verb|\-d\| & & d-bar \\ \verb|\n~\| & & n tilde \\ \verb|\o`\| & & o grave \\ \verb|\o'\| & & o acute \\ \verb|\o^\| & & o circumflex \\ \verb|\o~\| & & o tilde \\ \verb|\o..\| & & o dieresis \\ \verb|\/\| & & division symbol \\ \verb|\o/\| & & o slash \\ \verb|\u`\| & & u grave \\ \verb|\u'\| & & u acute \\ \verb|\u^\| & & u circumflex \\ \verb|\u..\| & & u dieresis \\ \verb|\y'\| & & y acute \\ \verb|\i>\| & & ip \\ \verb|\y..\| & & y dieresis \\ \hline \end{tabular} \caption{Lower case international letters in ASCII export files} \label{tbl:ASCII-international2} \end{center} \end{table} \section{Toolbars} \label{sec:toolbar} The \key{Toolbar} block can be used to replace the standard menu with a user defined set of menus that can actually execute blocks of code. This has real potential for improving the user interface. However, it is not clear how to take advantage of this. The principal issue is that while the custom toolbar is active, it supercedes all of the other calculator functions---including the home screen. The following code illustrates the use of this functionality. @O MA206CMD.TXT @{\START92\ \COMMENT= \NAME=MA206CMD \FILE=MA206CMD.89P () Prgm \(C)\ Experimental program to execute commands \(C)\ directly Lbl start ToolBar Title "Tools" Item "Exit", quit Item "Clear", clear Title "Distr" Item "Binomial", binomial Item "Hypergeo", hyg Item "Uniform", unif Item "Exponential", exp Item "Normal", nml EndTbar Lbl binomial ma206\binomGUI() Goto start Lbl hyg ma206\hypergeo() Goto start Lbl unif ma206\unifGUI() Goto start Lbl exp ma206\expGUI() Goto start Lbl nml ma206\normCDF() Goto start Lbl clear ClrHome Goto start Lbl quit EndPrgm \STOP92\ @} \section{Random Notes} \subsection{Help Strings} The \key{catalog} screen reports as ``help'' information the first comment line after the \key{Prgm} or \key{Func} line of the program. This line can be longer than an output line; it will be wrapped into a dialog box when the user presses \key{F1}. However, only the first few characters will be displayed at the bottom of the catalog screen. \index{comment strings} \index{user help} \subsection{Unavailable Functionality} It does not appear to be possible to insert a function prototype (i.e. to give variable names for arguments to a function to be pasted into the entry line) using a custom menu. It does not appear possible to allow a variable number of parameters to be passed to a function or program, or to branch within a function or program based on the number of supplied parameters. \subsection{Automatic Alpha Lock} \label{sec:autoaoff} The TI-89 automatically turns on the ``alpha lock'' when a dialog box is created using the \key{Request} command. While this would be convenient if strings were the expected input, it is less so in these applications. However, I do not know a way to turn the alpha lock back off or to keep it from turning on. the ``Auto Alpha-Lock Off'' program by Kevin Kofler (available from \url{www.ticalc.org}) can prevent this behavior.\index{autoaoff} \subsection{Additional Programming References} References~\cite{Mount-basic} and \cite{Mount-adv} provide some additional insight into programming the TI-89. \chapter{Revision History} This Appendix gives the revision history of this document as a whole. %%%% %%%% The RCS log is included as an aid to composing revision entries. % $Log: ti89ma206.w,v $ % Revision 15.1 2002/09/29 20:19:10 MarkWroth % Spell check. % % Added some discussion about the importance of how the instructor deals % with the subject. % \begin{revision}{15.0}{2002/09/29 18:50:44}{MarkWroth} Recovering the master files from backup following a computer crash. Adding and clarifying references to literate programming, including specifically comments on the use of \app{Nuweb}. \end{revision} \begin{revision}{14.10}{2002/06/23 22:21:10}{WrothMark} Fixed a command typo. \end{revision} \begin{revision}{14.9}{2002/06/23 22:18:13}{WrothMark} Minor discussion of autoaoff. Added some additional indexing commands. \end{revision} \begin{revision}{14.8}{2002/06/23 20:39:45}{WrothMark} Modified the definitions of the \verb|thebibliography| and \verb|theindex| environments to deal correctly with the bookmarks and table of contents by including entries in both places. \end{revision} \begin{revision}{14.7}{2002/06/23 20:23:40}{WrothMark} Added discussion of confidence intervals. \end{revision} \begin{revision}{14.6}{2002/06/21 02:47:44}{WrothMark} % Multiple changes as described in the revision history. % Added comment lines to the beginnings of functions and programs giving their argument lists. Added an example of manipulating an arbitrary \ac{PMF} for a discrete random variable. % Revision 14.5 2002/06/20 01:59:41 WrothMark % Conversion successful. % Converted the bibliography to a specially designed Bib\TeX\ format. Added an experimental Tool Bar menu. %\begin{revision}{14.4}{2002/06/19 18:29:39}{WrothMark} % Checked in prior to beginning the conversion of the bibliography to % BibTeX style. % Added general discussion at the beginning of the document. Added an example on the used of the calculator integration function to find the expected value using the definition. \end{revision} \begin{revision}{14.3}{2002/06/18 21:06:11}{WrothMark} Fixed a typo in the discussion of the check computations for the Equation~7.10 versus 7.11 debate. \end{revision} \begin{revision}{14.2}{2002/06/18 21:02:02}{WrothMark} Changed \key{binomCI} to use Devore 7.10 rather than 7.11 and midified the discussion for that program accordingly. Worked some on formatting of \key{BinomGUI} to reduce the number of lines that run off the page in the printed document. Since there does not appear to be a way to continue a line in the ASCII programming environment without awkward consequences in the execution environment, I have elected to add statements where needed to allow the lines to be shortened. \end{revision} \begin{revision}{14.1}{2002/06/18 19:12:46}{WrothMark} Added various illustrations, including a cartoon from the Pointer (with artist's permission). \end{revision} \begin{revision}{14.0}{16 JUN 02}{MBW} Converted the entire document to \key{Nuweb} and \LaTeX, in order to take advantage of the ASCII export functions of \key{TI-Graph Link} and to avoid the problems observed with missing characters in the HTML and RTF versions produced from the DocBook implementation. This also allows use of the various indexing functions in the literate programming tool \app{Nuweb} and in \LaTeX. This revision puts the mechanisms in place for this, but does not take full advantage of them. \end{revision} \begin{revision}{12}{20 June 2001}{MBW} Added \key{chi2int} discussion. \end{revision} \begin{revision}{11}{20 June 2000}{MBW} Additional general discussion. \end{revision} \begin{revision}{10}{19 June 2000}{MBW} Added an \key{MA206()} program which sets up a custom menu allowing commonly used functions to be pasted into the entry line. \end{revision} \begin{revision}{9}{17 June 2000}{MBW} Added appendix showing symbols, and procedure for normal probability plots. Included RevHistory in the hypergeo program listing as an experiment; as set up in the print version, the data remains in the SGML file, but is suppressed in the printed version, exactly as hoped. \end{revision} \begin{revision}{8}{15 June 2000}{MBW} Added procedures for graphical descriptive measures. Some update of other areas. \end{revision} \begin{revision}{7}{14 June 2000}{MBW} Added documentation for the \key{hypergeo()} program, and added the use of the callout element for documentation. \end{revision} \begin{revision}{6}{13 June 2000}{MBW} Completed reference page entries for the four functions documented in this paper, including adding examples. Moved the function definitions to the reference pages, rather than in the general discussion, for better parallelism with the pre-defined functions. \end{revision} \begin{revision}{5}{13 June 2000}{MBW} Added reference entries for hypergeometric distribution. The reference entries for the other defined programs still need to be done. \end{revision} \begin{revision}{4}{12 June 2000}{MBW} Added function definitions for hypergeometric distribution. \end{revision} \begin{revision}{3}{8 June 2000}{MBW} Added definitions for the uniform and exponential CDFs as example user defined functions. \end{revision} \begin{revision}{2}{4 June 2000}{MBW} Added basic information on the functions built in to the statistics application. Very limited coverage of the sections on estimation and hypothesis testing. \end{revision} \begin{revision}{1}{3 June 2000}{MBW} Initial conversion to SGML, including only the chapter on upgrading the calculator. \end{revision} \chapter{Upgrading a TI-89 Calculator for MA206 Probability and Statistics} \label{chap:upgrade} \section{Overview} To load the TI-89 Statistics with List Editor flash application, you need to load the Advanced Mathematics Software Operating System/base code, and then install the Statistics with List Editor application. The TI manual indicates that it is about four times faster to do this from calculator to calculator than from desktop to calculator. This discussion assume you have two TI-89 calculators, one with the Advanced Mathematics Software and Statistics with Lists application installed, and one which you are upgrading to that configuration, and that you have a calculator to calculator link cable. \section{Installing the Advanced Mathematics Software using another TI-89} \begin{enumerate} \item Ensure both calculators have fresh batteries. \begin{Warning} A power loss (or any other interruption) during this operation will mean the receiving unit has to be reloaded using a computer. \end{Warning} \item Ensure any data which is to be retained on the receiving calculator is backed up to another calculator or computer. \begin{Warning} This procedure will delete all user variables and reset the receiving calculator to its factory state. This may include deleting flash applications. \end{Warning} \item Link the two TI-89s using the calculator to calculator cable (as described on page 366 of the \textit{TI-89 and TI-92 Plus Guidebook}. \item On both calculators, select the LINK menu \begin{enumerate} \item Select \textbf{[2nd ] VAR-LINK} \item Select \textbf{F-3 LINK}. \end{enumerate} \item On the receiving calculator, select Receive Product Code \begin{enumerate} \item Cursor down until option 5: Receive Product Code is highlighted \item Press \textbf{ENTER} \item A warning message will display. Press \textbf{ENTER} to continue (or ESC to abort). \end{enumerate} \item On the sending calculator, select Send Product Software \begin{enumerate} \item Cursor down until option 4:Send Product SW is highlighted \item Press \key{Enter} \item A warning message will display. Press \textbf{ENTER} to continue (or \textbf{ESC} to abort). \end{enumerate} \item After a short pause (about five seconds), the receiving calculator will display a status message and progress indicator. Wait until the display clears (about six minutes). When the display clears, the transfer is complete. \begin{Warning} Interrupting the transmission will result in the receiving calculator becoming inoperable until it is reloaded from a computer. \end{Warning} \item Reload any backed-up data to be retained on the receiving calculator \end{enumerate} For more information on installing base code updates, see Upgrading Product Software (Base Code), beginning on page 373 of the \textit{TI-89 and TI-92 Plus Guidebook}. \section{Installing the Statistics with List Editor Flash Application Using Another TI-89} \begin{enumerate} \item Link the two TI-89s using the calculator to calculator cable (as described on page 366 of the \textsl{TI-89 and TI-92 Plus Guidebook} \cite{TI-89AMS}. \item On the sending calculator, select the \key{LINK} menu by selecting \key{[2nd ] VAR-LINK} \item On the sending calculator, select the Stats/List Edi flash application \begin{enumerate} \item Select \key{F-7 Flashapp} to display the list of flash applications \item Highlight the Stats/List Edi application (it may already be highlighted, for example if its the only one there). \item Press \key{F-4} to check mark the Stats/List Editor application. A small check mark should appear next to the application name. \end{enumerate} \item On the receiving calculator, select the LINK menu by selecting \key{[2nd] VAR-LINK}. Both calculators should now be in the VAR-LINK screen. \item On the receiving calculator, select the receive option \begin{enumerate} \item Select \textbf{F3 LINK} \item Move the highlight to option 2:Receive \item Press Enter. The messages {\small VAR-LINK WAITING TO RECEIVE} and {\small BUSY} should appear on the status line. \end{enumerate} \item On the sending calculator, select the \key{Send to TI-89/92 Plus} option \begin{enumerate} \item Select \textbf{F3 LINK} \item Move the highlight to option 3: Send to TI-89/92 Plus \item Press \textbf{ENTER}. The message {\small SENDING TISTATLE, a progress bar, and the BUSY indicator should be displayed on the receiving calculator.} \end{enumerate} \item Wait until the screen clears on the receiving calculator (about 75 seconds). When the receiving calculators VAR-LINK screen returns, the transmission is complete. \end{enumerate} For more information on installing flash applications, see Transmitting Variables, Flash Applications, and Folders, beginning on page 367 of the \textit{TI-89 and TI-92 Plus Guidebook} \section{Revision History} This is a revision history of the procedure described in this Appendix (i.e. of the procedure for upgrading the TI-89). \begin{revision}{1.2}{3 June 2000}{MBW} Conversion to SGML as a chapter in a DocBook book. \end{revision} \begin{revision}{1.1}{1 June 2000}{MBW} Minor edits after testing the procedunes. \end{revision} \begin{revision}{1.0}{30 May 2000}{MBW} Initial version. \end{revision} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Document Production Notes} \label{chap:docprod} This document is produced using \app{Nuweb}, a literate programming application originally by Preston Briggs and now maintained on SourceForge. The \fname{PDF} file is produced using \key{pdf\LaTeX}; customizations for this document are in the file \fname{calculator.sty} shown below. The intitial part of the style file is identification of the \LaTeX\ package. @O calculator.sty @{ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{calculator}[2002/06/23 MA206 Calculator Notes] @} Now we load the packages that are used in the document. @O calculator.sty @{ \usepackage{pxfonts} \usepackage{alltt,graphicx,longtable,makeidx,RCS,verbatim} \usepackage{hyperref} \usepackage{acronym} \usepackage{multicol} @} This records the revision of the document that produces this. @O calculator.sty @{ \RCS$Revision: 15.1 $ \RCS$Date: 2002/09/29 20:19:10 $ @} Now we set up the \fname{PDF} annotations. @O calculator.sty @{ \hypersetup{pdftitle={TI-89 in MA206}, pdfkeywords={probability, statistics, calculator, TI-89}, pdfpagemode={UseOutlines}, hypertexnames=false } @} This environment will allow us to write a Bib\TeX\ bibliography as part of this file. It will be written to disk as \jobname.bib, and then can be processed using the normal Bib\TeX\ commands. @O calculator.sty @{ \newwrite\verbatim@@out \newenvironment{bibtex}% {\@@bsphack \immediate\openout \verbatim@@out \jobname.bib \let\do\@@makeother\dospecials\catcode`\^^M\active \def\verbatim@@processline{% \immediate\write\verbatim@@out{\the\verbatim@@line}}% \verbatim@@start}% {{\immediate\closeout\verbatim@@out\@@esphack}} @} Likewise we modify the definition of the \verb|thebibliography| environment to cause it to make an appropriate table of contents (and hence PDF bookmark) entry. @O calculator.sty @{ \setlength\bibindent{1.5em} \renewenvironment{thebibliography}[1] {\list{\@@biblabel{\@@arabic\c@@enumiv}}% {\settowidth\labelwidth{\@@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@@openbib@@code \usecounter{enumiv}% \let\p@@enumiv\@@empty \renewcommand\theenumiv{\@@arabic\c@@enumiv}}% \sloppy \clubpenalty4000 \@@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@@m} {\def\@@noitemerr {\@@latex@@warning{Empty `thebibliography' environment}}% \endlist} \let\@@openbib@@code\@@empty @} This change redefines the \verb|index| environment so that it too is appropriately entered into the table of contents and list of bookmarks. @O calculator.sty @{ \renewcommand{\indexname}{General Index} % from report.cls \renewenvironment{theindex} {\begin{multicols}{2} \let\item\@@idxitem } {\end{multicols}} \renewcommand\@@idxitem{\par\hangindent 40\p@@} \renewcommand\subitem{\@@idxitem \hspace*{20\p@@}} \renewcommand\subsubitem{\@@idxitem \hspace*{30\p@@}} \renewcommand\indexspace{\par \vskip 10\p@@ \@@plus5\p@@ \@@minus3\p@@\relax} \renewcommand*\see[2]{\emph{\seename} #1} \renewcommand{\hyperpage}[1]{{#1}} @} The following macros are used for simplicity in writing. @O calculator.sty @{ \newcommand{\key}[1]{\texttt{#1}} \newenvironment{Note}{% \begin{quotation} \begin{center}Note\end{center}\noindent}% {\end{quotation}} \newenvironment{Warning}{\begin{center}{Warning}\end{center}% \begin{quotation}\noindent}{% \end{quotation}} \newenvironment{tip}{% \begin{quotation}\noindent\textbf{Tip: }}{% \end{quotation}} \newenvironment{varlist}{% \begin{description} \renewcommand{\key}[1]{\item[\texttt{##1}\index{##1 (variable)}]}}{% \end{description}} @} @O calculator.sty @{ \newcommand{\dfn}[1]{\textit{#1}\index{#1}} \newcommand{\app}[1]{\textit{#1}\index{#1}} \newcommand{\fname}[1]{\texttt{#1}\index{#1 (filename)}} \newcommand{\guimenu}[1]{\texttt{#1}} \newcommand{\program}[1]{\texttt{#1}} \newcommand{\acr}[1]{\ac{#1}\index{#1}} \newenvironment{revision}[3]{% \par\noindent\textbf{Revision #1}\textit{(#2; #3)}}{% \relax} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\StatsLE}{\textsl{TI-89 Statistics with List Editor}} \newcommand{\phat}{\ensuremath{\hat{p}}} \newcommand{\qhat}{\ensuremath{\hat{q}}} \newcommand{\TIint}{\ensuremath{\int}} \newcommand{\caret}{\^{\space}} \def\nCr(#1,#2){\left(\begin{array}{c}#1\\#2\end{array}\right)} \def\P(#1){\ensuremath{{\cal P}\left(#1\right)}} \def\V(#1){\ensuremath{{\cal V}\left(#1\right)}} \def\E(#1){\ensuremath{{\cal E}\left(#1\right)}} \def\CI(#1,#2){\ensuremath{\left(#1, #2\right)}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeindex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @} \chapter{Acronyms} \begin{acronym} \acro{CAS}{Computer Algebra System} \acro{CDF}{Cumlative Distribution Function} \acro{GUI}{Graphical User Interface} \acro{MVUE}{Minimum Variance Unbiased Estimator} \acro{NIST}{National Institute of Standards and Technology} \acro{PDF}{Probability Density Function} \acro{PMF}{Probability Mass Function} \acro{USMA}{United States Military Academy} \end{acronym} \chapter{Bibliography} \begin{bibtex} @@Article{Agresti, author = {Agresti, Alan and Brent Coull}, title = {Approximate Is Better Than `Exact' for Interval Estimation of a Binomial Proportion}, journal = {The American Statistician}, year = {1998}, pages = {119--126}, note = {Cited in \cite{Devore5}} } @@Book{Devore5, editor = {Devore, Jay L.}, title = {Probability and Statistics for Engineering and the Sciences}, publisher = {Duxbury Press}, year = {1999}, address = {Belmont, CA}, edition = {5th} } @@Misc{IM206-1, key = {IM206-1}, author = {Knellinger, David}, title = {{MA 206 -- Probability and Statistics}}, howpublished = {Department of Mathematical Sciences Instructional Memorandum 206-1}, month = {27~May}, year = {2002} } @@misc{nuweb, author = {Preston Briggs and Marc W. Mengel}, title = {Nuweb Version 1.0b1: A Simple Literate Programming Tool}, year = 2002, note = {\url{http://sourceforge.net/projects/nuweb/}; version 1.0b1 was released 24 February 2002. An older version is available as a Windows executable from \url{http://www.west-point.org/users/usma1978/36200/LitProg/Nuweb/readme.html}. } } @@Manual{NIST-TN1297, title = {Guidelines for Evaluating and Expressing the Uncertainty of {NIST} Measurement Results}, author = {Barry N. Taylor and Chris E. Kuyatt}, month = {September}, year = 1994, organization = {National Institute of Standards and Technology}, address = {Gaithersburg, MD}, howpublished = {Technical Note~1297} } @@Manual{TI-89Guide, title = {TI-89 Guidebook}, organization = {Texas Instruments}, note = {This is the users manual for the TI-89 itself, as purchased.} } @@Manual{TI-89AMS, title = {TI-89 and TI-92 Plus Guidebook for Advanced Mathematics Software Version 2.0}, organization = {Texas Instruments}, url = {http://www.ti.com/calc/docs/8992pguide.htm}, note = {This is the updated manual for the Advanced Mathematics Software; it replaces the manual included with the calculator.} } @@Manual{22link, title = {Downloading Applications to the {TI-89}}, organization = {Texas Instruments}, url = {http://www.ti.com/calc/pdf/gb/eng/8992p/22link.pdf}, note = {Chapter 22 of the\textit{TI-89 and TI-92 Plus Guidebook}} } @@Manual{AMS, title = {Advanced Mathematics Software}, organization = {Texas Instruments}, url = {http://www.ti.com/calc/flash/89ams.htm}, note = {This is an overview page for the AMS upgrade} } @@Manual{StatsLEov, title = {Statistics with List Editor}, organization = {Texas Instruments}, url = {http://www.ti.com/calc/flash/89stats.htm}, note = {This is an overview page for the Statistics with List Editor package.} } @@Manual{TI-89STATSLE, title = {Statistics with List Editor}, organization = {Texas Instruments}, url = {http://www.ti.com/calc/flash/pdf/statsle.pdf}, note = {\url{http://www.ti.com/calc/flash/pdf/statsle.pdf}. This is the users guide for the Statistics with List Editor application.} } @@book{Burrill, author = {Gail Burrill and Jacquie Allison and Glenda Breaux and Signe Kastberg and Keith Leatham and Wendy Sanchez}, title = {Handheld Graphing Technology in Secondary Mathematics: Research Findings and Implications for Classroom Practice}, publisher = {Texas Instruments}, year = {2002?}, note = {Prepared through a grant to Michigan State University} } @@Manual{GraphLink, title = {{TI-GRAPH LINK} for {Windows} for the {TI-89}: Condensed Guidebook}, organization = {Texas Instruments Inc.} } @@Misc{ascii.txt, title = {{ASCII} conversion codes for {ASCII} calculator program code}, author = {Unknown}, note = {Downloaded from \url{http://www.ticalc.org/pub/text/misc} on 19 JUN 02. The only indication of authorship is ``Last Update: 12 Mar 96 SLR'' at the end of the file.} } @@Misc{Mount-basic, author = {Tom Mount}, title = {{TI~89/92 Basic Programming Manual}}, url = {http://usa.internations.net/cyber/CalcTI/default.htm}, note = {Downloaded from \url{http://www.ticalc.org/pub/text/misc} on 19 JUN 02.} } @@Misc{Mount-adv, author = {Tom Mount}, title = {{TI~89/92 Advanced Programming Manual}}, year = 2001, url = {http://usa.internations.net/cyber/CalcTI/default.htm}, note = {Downloaded from \url{http://www.ticalc.org/pub/text/misc} on 19 JUN 02.} } \end{bibtex} \bibliographystyle{plain} \bibliography{\jobname} \chapter{Indexes} \section{Files Written} \label{sec:files} @f \section{Scraps Defined} @m \section{Identifiers} @u \section{General Index} \printindex \chapter*{To Do} \begin{itemize} \item Convert all of the input and output variable lists to \verb+varlist+s \item Add GUI's callable by the MA206 menu for the remaining TI-89 functions commonly used. \item Index the various distributions and add cross references between the discussion of usage and the relevant implementing function. \item Add a section discussing the used of simulation on the calculator, with particular reference to the simulation of sampling experiments and computation of test statistics or confidence intervals. \item Extend the CI functions to allow computations on a sample provided as a list (similar to the TIStat functions). \end{itemize} \end{document}